pub enum NotationPart {
Literal(String),
Placeholder(String),
Prec(u32),
}Expand description
A single part of a notation pattern.
Notation patterns are sequences of literals and placeholders:
notation:50 lhs " + " rhs => HAdd.hAdd lhs rhs
^^^ ^^^^^ ^^^
Placeholder Literal PlaceholderVariants§
Literal(String)
A literal string token (e.g. " + ", "if")
Placeholder(String)
A placeholder for a variable position (e.g. lhs, rhs)
Prec(u32)
A precedence annotation on a placeholder
Trait Implementations§
Source§impl Clone for NotationPart
impl Clone for NotationPart
Source§fn clone(&self) -> NotationPart
fn clone(&self) -> NotationPart
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 NotationPart
impl Debug for NotationPart
Source§impl Display for NotationPart
impl Display for NotationPart
Source§impl PartialEq for NotationPart
impl PartialEq for NotationPart
impl Eq for NotationPart
impl StructuralPartialEq for NotationPart
Auto Trait Implementations§
impl Freeze for NotationPart
impl RefUnwindSafe for NotationPart
impl Send for NotationPart
impl Sync for NotationPart
impl Unpin for NotationPart
impl UnsafeUnpin for NotationPart
impl UnwindSafe for NotationPart
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