[−][src]Module genco::prelude::rust
Specialization for Rust code generation.
Examples
use genco::prelude::*; let toks: rust::Tokens = quote! { fn foo() -> u32 { 42 } }; assert_eq!( vec![ "fn foo() -> u32 {", " 42", "}", ], toks.to_file_vec().unwrap() )
String quoting in Rust:
use genco::prelude::*; let toks: rust::Tokens = quote!(#("hello \n world".quoted())); assert_eq!("\"hello \\n world\"", toks.to_string().unwrap());
Structs
Config | Language configuration for Rust. |
Ref | The inferred reference. |
Rust | Language specialization for Rust. |
StaticRef | The static reference. |
Type | An imported name in Rust. |
Enums
Import | The import policy to use when generating import statements. |
Reference | Reference information about a name. |
Constants
I8 | The |
I16 | The |
I32 | The |
I64 | The |
I128 | The |
ISIZE | The |
NEVER | The |
U8 | The |
U16 | The |
U32 | The |
U64 | The |
U128 | The |
UNIT | The |
USIZE | The |
Traits
Args | Helper trait for things that can be turned into generic arguments. |
Functions
const_local | Helper function to construct a constant local type. |
imported | Setup an imported element. |
local | Setup a local element. |
Type Definitions
LangBox | Language box specialization for Rust. |
Tokens | Tokens container specialization for Rust. |