Struct rust_sitter::Spanned
source · pub struct Spanned<T> {
pub value: T,
pub span: (usize, usize),
}Expand description
A wrapper around a value that also contains the span of the value in the source.
Fields§
§value: TThe underlying parsed node.
span: (usize, usize)The span of the node in the source. The first value is the inclusive start of the span, and the second value is the exclusive end of the span.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Spanned<T>where
T: Freeze,
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>where
T: Unpin,
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