pub struct NotationEntry {
pub kind: NotationKind,
pub name: String,
pub pattern: Vec<NotationPart>,
pub expansion: String,
pub priority: u32,
pub scopes: Vec<String>,
}Expand description
A registered notation declaration.
This captures the full information from a notation, prefix, infix,
etc. declaration.
Fields§
§kind: NotationKindThe kind of notation (prefix, infix, mixfix, etc.)
name: StringName of the notation (often the operator symbol)
pattern: Vec<NotationPart>The pattern parts describing the syntax
expansion: StringThe expansion string (the right-hand side of =>)
priority: u32Priority / precedence level
scopes: Vec<String>Scopes in which this notation is active
Implementations§
Source§impl NotationEntry
impl NotationEntry
Sourcepub fn new(
kind: NotationKind,
name: String,
pattern: Vec<NotationPart>,
expansion: String,
priority: u32,
) -> Self
pub fn new( kind: NotationKind, name: String, pattern: Vec<NotationPart>, expansion: String, priority: u32, ) -> Self
Create a new notation entry.
Sourcepub fn with_scopes(self, scopes: Vec<String>) -> Self
pub fn with_scopes(self, scopes: Vec<String>) -> Self
Create a new notation entry with scopes.
Trait Implementations§
Source§impl Clone for NotationEntry
impl Clone for NotationEntry
Source§fn clone(&self) -> NotationEntry
fn clone(&self) -> NotationEntry
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 NotationEntry
impl Debug for NotationEntry
Source§impl PartialEq for NotationEntry
impl PartialEq for NotationEntry
impl Eq for NotationEntry
impl StructuralPartialEq for NotationEntry
Auto Trait Implementations§
impl Freeze for NotationEntry
impl RefUnwindSafe for NotationEntry
impl Send for NotationEntry
impl Sync for NotationEntry
impl Unpin for NotationEntry
impl UnsafeUnpin for NotationEntry
impl UnwindSafe for NotationEntry
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