Struct syntex::Registry
[−]
[src]
pub struct Registry { // some fields omitted }
Methods
impl Registry
[src]
fn new() -> Registry
fn add_cfg(&mut self, cfg: &str)
fn add_attr(&mut self, attr: &str)
fn add_macro<F>(&mut self, name: &str, extension: F) where F: TTMacroExpander + 'static
fn add_ident_macro<F>(&mut self, name: &str, extension: F) where F: IdentMacroExpander + 'static
fn add_decorator<F>(&mut self, name: &str, extension: F) where F: MultiItemDecorator + 'static
fn add_modifier<F>(&mut self, name: &str, extension: F) where F: MultiItemModifier + 'static
fn add_pre_expansion_pass(&mut self, pass: Pass)
fn add_post_expansion_pass(&mut self, pass: Pass)
fn expand<S, D>(self, crate_name: &str, src: S, dst: D) -> Result<(), Error> where S: AsRef<Path>, D: AsRef<Path>
fn expand_str(self, crate_name: &str, src_name: &str, src: &str) -> Result<String, Error>
This method will expand all macros in the source string src
, and return the results in a
string.