pub struct MacroLibrary {
pub groups: HashMap<String, Vec<MacroDefinitionExt>>,
}Expand description
A macro library with named groups.
Fields§
§groups: HashMap<String, Vec<MacroDefinitionExt>>Groups of macros
Implementations§
Source§impl MacroLibrary
impl MacroLibrary
Sourcepub fn add_to_group(&mut self, group: &str, def: MacroDefinitionExt)
pub fn add_to_group(&mut self, group: &str, def: MacroDefinitionExt)
Add a macro to a group.
Sourcepub fn group(&self, name: &str) -> &[MacroDefinitionExt]
pub fn group(&self, name: &str) -> &[MacroDefinitionExt]
Returns all macros in a group.
Sourcepub fn total_macros(&self) -> usize
pub fn total_macros(&self) -> usize
Total number of macros.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MacroLibrary
impl RefUnwindSafe for MacroLibrary
impl Send for MacroLibrary
impl Sync for MacroLibrary
impl Unpin for MacroLibrary
impl UnsafeUnpin for MacroLibrary
impl UnwindSafe for MacroLibrary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more