pub struct Spanned<T> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl From<Spanned<Expression>> for CaseSelector
impl From<Spanned<Expression>> for CaseSelector
Source§fn from(value: Spanned<Expression>) -> CaseSelector
fn from(value: Spanned<Expression>) -> CaseSelector
Converts to this type from the input type.
Source§impl From<Spanned<Expression>> for ReturnStatement
impl From<Spanned<Expression>> for ReturnStatement
Source§fn from(expression: Spanned<Expression>) -> ReturnStatement
fn from(expression: Spanned<Expression>) -> ReturnStatement
Converts to this type from the input type.
Source§impl<T> SyntaxNode for Spanned<T>where
T: SyntaxNode,
impl<T> SyntaxNode for Spanned<T>where
T: SyntaxNode,
Source§fn attributes(&self) -> &[Spanned<Attribute>]
fn attributes(&self) -> &[Spanned<Attribute>]
List all attributes of a syntax node.
Source§fn attributes_mut(&mut self) -> &mut [Spanned<Attribute>]
fn attributes_mut(&mut self) -> &mut [Spanned<Attribute>]
List all attributes of a syntax node.
Source§fn retain_attributes_mut<F>(&mut self, f: F)
fn retain_attributes_mut<F>(&mut self, f: F)
Remove attributes with predicate.
Source§fn contains_attribute(&self, attribute: &Attribute) -> bool
fn contains_attribute(&self, attribute: &Attribute) -> bool
Whether the node contains an attribute.
Source§impl Visit<Spanned<Expression>> for Expression
impl Visit<Spanned<Expression>> for Expression
Source§fn visit<'a>(&'a self) -> impl Iterator<Item = &'a ExpressionNode>where
ExpressionNode: 'a,
fn visit<'a>(&'a self) -> impl Iterator<Item = &'a ExpressionNode>where
ExpressionNode: 'a,
Source§fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut ExpressionNode>where
ExpressionNode: 'a,
fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut ExpressionNode>where
ExpressionNode: 'a,
Mutable version of
Self::visit.Source§impl Visit<Spanned<Expression>> for Statement
impl Visit<Spanned<Expression>> for Statement
Source§fn visit<'a>(&'a self) -> impl Iterator<Item = &'a ExpressionNode>where
ExpressionNode: 'a,
fn visit<'a>(&'a self) -> impl Iterator<Item = &'a ExpressionNode>where
ExpressionNode: 'a,
Source§fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut ExpressionNode>where
ExpressionNode: 'a,
fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut ExpressionNode>where
ExpressionNode: 'a,
Mutable version of
Self::visit.Source§impl Visit<Spanned<Expression>> for TranslationUnit
impl Visit<Spanned<Expression>> for TranslationUnit
Source§fn visit<'a>(&'a self) -> impl Iterator<Item = &'a ExpressionNode>where
ExpressionNode: 'a,
fn visit<'a>(&'a self) -> impl Iterator<Item = &'a ExpressionNode>where
ExpressionNode: 'a,
Source§fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut ExpressionNode>where
ExpressionNode: 'a,
fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut ExpressionNode>where
ExpressionNode: 'a,
Mutable version of
Self::visit.Source§impl Visit<Spanned<Expression>> for GlobalDeclaration
impl Visit<Spanned<Expression>> for GlobalDeclaration
Source§fn visit<'a>(&'a self) -> impl Iterator<Item = &'a ExpressionNode>where
ExpressionNode: 'a,
fn visit<'a>(&'a self) -> impl Iterator<Item = &'a ExpressionNode>where
ExpressionNode: 'a,
Source§fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut ExpressionNode>where
ExpressionNode: 'a,
fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut ExpressionNode>where
ExpressionNode: 'a,
Mutable version of
Self::visit.Source§impl Visit<Spanned<Statement>> for Statement
impl Visit<Spanned<Statement>> for Statement
Source§fn visit<'a>(&'a self) -> impl Iterator<Item = &'a StatementNode>where
StatementNode: 'a,
fn visit<'a>(&'a self) -> impl Iterator<Item = &'a StatementNode>where
StatementNode: 'a,
Source§fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut StatementNode>where
StatementNode: 'a,
fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut StatementNode>where
StatementNode: 'a,
Mutable version of
Self::visit.Source§impl Visit<Spanned<Statement>> for TranslationUnit
impl Visit<Spanned<Statement>> for TranslationUnit
Source§fn visit<'a>(&'a self) -> impl Iterator<Item = &'a StatementNode>where
StatementNode: 'a,
fn visit<'a>(&'a self) -> impl Iterator<Item = &'a StatementNode>where
StatementNode: 'a,
Source§fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut StatementNode>where
StatementNode: 'a,
fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut StatementNode>where
StatementNode: 'a,
Mutable version of
Self::visit.Source§impl Visit<Spanned<Statement>> for GlobalDeclaration
impl Visit<Spanned<Statement>> for GlobalDeclaration
Source§fn visit<'a>(&'a self) -> impl Iterator<Item = &'a StatementNode>where
StatementNode: 'a,
fn visit<'a>(&'a self) -> impl Iterator<Item = &'a StatementNode>where
StatementNode: 'a,
Source§fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut StatementNode>where
StatementNode: 'a,
fn visit_mut<'a>(&'a mut self) -> impl Iterator<Item = &'a mut StatementNode>where
StatementNode: 'a,
Mutable version of
Self::visit.Auto Trait Implementations§
impl<T> Freeze for Spanned<T>
impl<T> RefUnwindSafe for Spanned<T>where
T: RefUnwindSafe,
impl<T> Send for Spanned<T>where
T: Send,
impl<T> Sync for Spanned<T>where
T: Sync,
impl<T> Unpin for Spanned<T>
impl<T> UnsafeUnpin for Spanned<T>
impl<T> UnwindSafe for Spanned<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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Source for T
impl<T> Source for T
Source§type Slice<'a> = <<T as Deref>::Target as Source>::Slice<'a>
where
T: 'a
type Slice<'a> = <<T as Deref>::Target as Source>::Slice<'a> where T: 'a
A type this
Source can be sliced into.Source§fn read<'a, Chunk>(&'a self, offset: usize) -> Option<Chunk>where
Chunk: Chunk<'a>,
fn read<'a, Chunk>(&'a self, offset: usize) -> Option<Chunk>where
Chunk: Chunk<'a>,
Read a chunk of bytes into an array. Returns
None when reading
out of bounds would occur. Read moreSource§fn slice(&self, range: Range<usize>) -> Option<<T as Source>::Slice<'_>>
fn slice(&self, range: Range<usize>) -> Option<<T as Source>::Slice<'_>>
Get a slice of the source at given range. This is analogous to
slice::get(range). Read moreSource§unsafe fn slice_unchecked(
&self,
range: Range<usize>,
) -> <T as Source>::Slice<'_>
unsafe fn slice_unchecked( &self, range: Range<usize>, ) -> <T as Source>::Slice<'_>
Get a slice of the source at given range. This is analogous to
slice::get_unchecked(range). Read more