pub struct NotationRegistry {
pub rules: Vec<NotationRule>,
}Expand description
A simple notation registry that maps patterns to rules.
Fields§
§rules: Vec<NotationRule>All registered rules
Implementations§
Source§impl NotationRegistry
impl NotationRegistry
Sourcepub fn register(&mut self, rule: NotationRule)
pub fn register(&mut self, rule: NotationRule)
Register a new rule.
Sourcepub fn find_by_pattern(&self, pattern: &str) -> Vec<&NotationRule>
pub fn find_by_pattern(&self, pattern: &str) -> Vec<&NotationRule>
Find rules by pattern (exact match).
Sourcepub fn find_by_namespace(&self, ns: &str) -> Vec<&NotationRule>
pub fn find_by_namespace(&self, ns: &str) -> Vec<&NotationRule>
Find rules in a given namespace.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NotationRegistry
impl RefUnwindSafe for NotationRegistry
impl Send for NotationRegistry
impl Sync for NotationRegistry
impl Unpin for NotationRegistry
impl UnsafeUnpin for NotationRegistry
impl UnwindSafe for NotationRegistry
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