pub struct MacroRegistry { /* private fields */ }Expand description
Registry of macros with efficient lookup.
Macros are keyed by name:arg_count:is_receiver.
Lookup tries the exact key first, then falls back to a vararg key.
Implementations§
Source§impl MacroRegistry
impl MacroRegistry
Sourcepub fn lookup(
&self,
name: &str,
arg_count: usize,
is_receiver: bool,
) -> Option<&Macro>
pub fn lookup( &self, name: &str, arg_count: usize, is_receiver: bool, ) -> Option<&Macro>
Look up a macro by name, argument count, and receiver style.
First tries exact match, then falls back to vararg match if applicable.
Trait Implementations§
Source§impl Clone for MacroRegistry
impl Clone for MacroRegistry
Source§fn clone(&self) -> MacroRegistry
fn clone(&self) -> MacroRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MacroRegistry
impl Debug for MacroRegistry
Auto Trait Implementations§
impl Freeze for MacroRegistry
impl RefUnwindSafe for MacroRegistry
impl Send for MacroRegistry
impl Sync for MacroRegistry
impl Unpin for MacroRegistry
impl UnwindSafe for MacroRegistry
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