Trait ModuleExt

Source
pub trait ModuleExt {
    // Required method
    fn add_item(&mut self, item: Item) -> &mut Self;

    // Provided methods
    fn add_item_by_glob<F: Fn(&Path) -> Item>(
        &mut self,
        pattern: &str,
        f: F,
    ) -> Result<&mut Self, PatternError> { ... }
    fn add_include_str_by_glob<F: Fn(&Path) -> Ident>(
        &mut self,
        pattern: &str,
        f: F,
    ) -> Result<&mut Self, PatternError> { ... }
    fn add_include_byte_by_glob<F: Fn(&Path) -> Ident>(
        &mut self,
        pattern: &str,
        f: F,
    ) -> Result<&mut Self, PatternError> { ... }
}

Required Methods§

Source

fn add_item(&mut self, item: Item) -> &mut Self

添加元素

Provided Methods§

Source

fn add_item_by_glob<F: Fn(&Path) -> Item>( &mut self, pattern: &str, f: F, ) -> Result<&mut Self, PatternError>

Source

fn add_include_str_by_glob<F: Fn(&Path) -> Ident>( &mut self, pattern: &str, f: F, ) -> Result<&mut Self, PatternError>

Source

fn add_include_byte_by_glob<F: Fn(&Path) -> Ident>( &mut self, pattern: &str, f: F, ) -> Result<&mut Self, PatternError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ModuleExt for ItemMod

Source§

fn add_item(&mut self, item: Item) -> &mut Self

Implementors§