Struct scilla_parser::ast::nodes::WithMetaData
source · pub struct WithMetaData<T> {
pub node: T,
pub start: SourcePosition,
pub end: SourcePosition,
}Expand description
A wrapper struct that adds source position to an AST node.
Fields§
§node: TThe AST node
start: SourcePositionThe starting position of the AST node in the source code
end: SourcePositionThe ending position of the AST node in the source code
Trait Implementations§
source§impl<T: AstVisitor> AstVisitor for WithMetaData<T>
impl<T: AstVisitor> AstVisitor for WithMetaData<T>
fn visit( &self, emitter: &mut dyn AstConverting ) -> Result<TraversalResult, String>
source§impl<T: Clone> Clone for WithMetaData<T>
impl<T: Clone> Clone for WithMetaData<T>
source§fn clone(&self) -> WithMetaData<T>
fn clone(&self) -> WithMetaData<T>
Returns a copy 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<T: Debug> Debug for WithMetaData<T>
impl<T: Debug> Debug for WithMetaData<T>
source§impl<T: Display> Display for WithMetaData<T>
impl<T: Display> Display for WithMetaData<T>
Implementing Display trait for WithMetaData struct
source§impl<T: PartialEq> PartialEq for WithMetaData<T>
impl<T: PartialEq> PartialEq for WithMetaData<T>
source§fn eq(&self, other: &WithMetaData<T>) -> bool
fn eq(&self, other: &WithMetaData<T>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<T: PartialOrd> PartialOrd for WithMetaData<T>
impl<T: PartialOrd> PartialOrd for WithMetaData<T>
source§fn partial_cmp(&self, other: &WithMetaData<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &WithMetaData<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl<T: Eq> Eq for WithMetaData<T>
impl<T> StructuralEq for WithMetaData<T>
impl<T> StructuralPartialEq for WithMetaData<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for WithMetaData<T>where
T: RefUnwindSafe,
impl<T> Send for WithMetaData<T>where
T: Send,
impl<T> Sync for WithMetaData<T>where
T: Sync,
impl<T> Unpin for WithMetaData<T>where
T: Unpin,
impl<T> UnwindSafe for WithMetaData<T>where
T: UnwindSafe,
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