[−][src]Module genco::rust
Specialization for Rust code generation.
Examples
#[feature(proc_macro_hygiene)] 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:
#[feature(proc_macro_hygiene)] 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. |
Name | A name. |
Ref | The inferred reference. |
Rust | Language specialization for Rust. |
StaticRef | The static reference. |
Type | An imported name in Rust. |
Enums
Reference | Reference information about a name. |
Traits
Args | Helper trait for things that can be turned into generic arguments. |
Functions
imported | Setup an imported element. |
local | Setup a local element. |
Type Definitions
LangBox | Language box specialization for Rust. |
Tokens | Tokens container specialization for Rust. |