pub struct Spanned<T> {
pub node: T,
pub span: Span,
}
Expand description
Associate a Span with a value of arbitrary type (e.g. an AST node).
Fields§
§node: T
Data in the node.
span: Span
Implementations§
Trait Implementations§
source§impl<A> ArgumentPExt<A> for Spanned<ArgumentP<A>>where
A: AstPayload,
impl<A> ArgumentPExt<A> for Spanned<ArgumentP<A>>where
A: AstPayload,
fn into_map_payload<B>(
self,
f: &mut impl AstPayloadFunction<A, B>
) -> Spanned<ArgumentP<B>>where
B: AstPayload,
source§impl<A> AssignIdentPExt<A> for Spanned<AssignIdentP<A>>where
A: AstPayload,
impl<A> AssignIdentPExt<A> for Spanned<AssignIdentP<A>>where
A: AstPayload,
fn into_map_payload<B>(
self,
f: &mut impl AstPayloadFunction<A, B>
) -> Spanned<AssignIdentP<B>>where
B: AstPayload,
source§impl<A> AssignTargetPExt<A> for Spanned<AssignTargetP<A>>where
A: AstPayload,
impl<A> AssignTargetPExt<A> for Spanned<AssignTargetP<A>>where
A: AstPayload,
fn into_map_payload<B>(
self,
f: &mut impl AstPayloadFunction<A, B>
) -> Spanned<AssignTargetP<B>>where
B: AstPayload,
source§impl<A> ExprPExt<A> for Spanned<ExprP<A>>where
A: AstPayload,
impl<A> ExprPExt<A> for Spanned<ExprP<A>>where
A: AstPayload,
fn into_map_payload<B>(
self,
f: &mut impl AstPayloadFunction<A, B>
) -> Spanned<ExprP<B>>where
B: AstPayload,
source§impl<A> FStringPExt<A> for Spanned<FStringP<A>>where
A: AstPayload,
impl<A> FStringPExt<A> for Spanned<FStringP<A>>where
A: AstPayload,
fn into_map_payload<B>(
self,
f: &mut impl AstPayloadFunction<A, B>
) -> Spanned<FStringP<B>>where
B: AstPayload,
source§impl<A> IdentPExt<A> for Spanned<IdentP<A>>where
A: AstPayload,
impl<A> IdentPExt<A> for Spanned<IdentP<A>>where
A: AstPayload,
fn into_map_payload<B>(
self,
f: &mut impl AstPayloadFunction<A, B>
) -> Spanned<IdentP<B>>where
B: AstPayload,
source§impl<A> ParameterPExt<A> for Spanned<ParameterP<A>>where
A: AstPayload,
impl<A> ParameterPExt<A> for Spanned<ParameterP<A>>where
A: AstPayload,
fn into_map_payload<B>(
self,
f: &mut impl AstPayloadFunction<A, B>
) -> Spanned<ParameterP<B>>where
B: AstPayload,
source§impl<T> PartialEq for Spanned<T>where
T: PartialEq,
impl<T> PartialEq for Spanned<T>where
T: PartialEq,
source§impl<A> StmtPExt<A> for Spanned<StmtP<A>>where
A: AstPayload,
impl<A> StmtPExt<A> for Spanned<StmtP<A>>where
A: AstPayload,
fn into_map_payload<B>(
self,
f: &mut impl AstPayloadFunction<A, B>
) -> Spanned<StmtP<B>>where
B: AstPayload,
source§impl<A> TypeExprPExt<A> for Spanned<TypeExprP<A>>where
A: AstPayload,
impl<A> TypeExprPExt<A> for Spanned<TypeExprP<A>>where
A: AstPayload,
fn into_map_payload<B>(
self,
f: &mut impl AstPayloadFunction<A, B>
) -> Spanned<TypeExprP<B>>where
B: AstPayload,
impl<T> Copy for Spanned<T>where
T: Copy,
impl<T> Eq for Spanned<T>where
T: Eq,
impl<T> StructuralPartialEq for Spanned<T>
Auto Trait Implementations§
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.