pub struct SyntaxSugarLibrary {
pub sugars: Vec<SyntaxSugar>,
}Expand description
A collection of syntax sugar definitions.
Fields§
§sugars: Vec<SyntaxSugar>All registered sugars
Implementations§
Source§impl SyntaxSugarLibrary
impl SyntaxSugarLibrary
Sourcepub fn add(&mut self, sugar: SyntaxSugar)
pub fn add(&mut self, sugar: SyntaxSugar)
Add a sugar.
Sourcepub fn find(&self, name: &str) -> Option<&SyntaxSugar>
pub fn find(&self, name: &str) -> Option<&SyntaxSugar>
Find a sugar by name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyntaxSugarLibrary
impl RefUnwindSafe for SyntaxSugarLibrary
impl Send for SyntaxSugarLibrary
impl Sync for SyntaxSugarLibrary
impl Unpin for SyntaxSugarLibrary
impl UnsafeUnpin for SyntaxSugarLibrary
impl UnwindSafe for SyntaxSugarLibrary
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