This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let s: String = ... | |
| let st: &str = ... | |
| let u: &[u8] = ... | |
| let b: [u8; 3] = b"foo" | |
| let v: Vec<u8> = ... | |
| let os: OsString = ... | |
| let ost: OsStr = ... | |
| From To Use Comment | |
| ---- -- --- ------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://medium.com/digitalfrontiers/rust-dynamic-dispatching-deep-dive-236a5896e49b | |
| https://www.lpalmieri.com/posts/skeleton-and-principles-for-a-maintainable-test-suite/#why-don-t-we-write-tests | |
| https://brson.github.io/2017/07/10/how-rust-is-tested | |
| https://quick-lint-js.com/blog/cpp-vs-rust-build-times/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| widget!(FineDialog { | |
| background: Brush, | |
| body_background: Brush, | |
| body_foreground: Brush, | |
| body_font: String, | |
| body_font_size: f64, | |
| body_padding: Thickness, | |
| border_brush: Brush, | |
| border_radius: f64, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::{fmt, path::Path}; | |
| use image::{GenericImageView, imageops::FilterType}; | |
| use crate::RenderTarget; | |
| #[derive(Clone, Default)] | |
| pub struct Image { | |
| render_target: RenderTarget, | |
| source: String, | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [package] | |
| name = "calendar" | |
| version = "0.1.0" | |
| authors = ["kivimango <balazsviktor23@gmail.com>"] | |
| edition = "2018" | |
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
| [dependencies] | |
| orbtk = { git = "https://github.com/redox-os/orbtk.git", branch = "develop" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use orbtk::prelude::*; | |
| use std::collections::HashMap; | |
| use orbtk::shell::WindowRequest; | |
| static ID_CHECK_POLICY_NUMBER: &'static str = "ID_CHECK_POLICY_NUMBER"; | |
| static PGBAR_ID: &'static str = "PGBAR_ID"; | |
| enum Action { | |
| ParsePolicyNumber | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use crate::core::list_dir::{list_dir, DirContent}; | |
| use orbtk::prelude::*; | |
| use orbtk::behaviors::MouseBehavior; | |
| use orbtk::shell::{Key, KeyEvent}; | |
| use std::path::PathBuf; | |
| type FileList = Vec<DirContent>; | |
| //const DIRECTORY_LIST_ID: &'static str = "directory_list"; | |
| const CWD_LABEL_ID: &'static str = "path_label"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use crate::core::list_dir::{list_dir, DirContent}; | |
| use orbtk::prelude::*; | |
| use std::path::PathBuf; | |
| use orbtk::shell::{Key, KeyEvent}; | |
| use orbtk::behaviors::MouseBehavior; | |
| type FileList = Vec<DirContent>; | |
| const DIRECTORY_LIST_ID: &'static str = "directory_list"; | |
| const CWD_LABEL_ID: &'static str = "path_label"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let files = list_dir(Path::new(".")); | |
| match files { | |
| Ok(content) => { | |
| println!("{0: <35} | {1: <10} | {2: <10} | {3: <10}", | |
| "Name", "Extension", "Created", "Size"); | |
| for f in content { | |
| println!("{0: <35} | {1: <10} | {2: <10} | {3: <10}", f.name, f.ext, f.date, f.size); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn main() { | |
| println!("Hello, world!"); | |
| let columns = vec!("Name", "Name", "ext", "Size", "Date", "Attr"); | |
| let row1 = MyData { | |
| name: "/home".parse().unwrap(), | |
| ext: "".parse().unwrap(), | |
| size : 348763, | |
| date: "2014.11.04 14:32".parse().unwrap(), | |
| attrs: "r---".to_string(), |
NewerOlder