Struct starlark_syntax::codemap::Spanned
source · 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: AstPayload> ArgumentPExt<A> for Spanned<ArgumentP<A>>
impl<A: AstPayload> ArgumentPExt<A> for Spanned<ArgumentP<A>>
fn into_map_payload<B: AstPayload>( self, f: &mut impl AstPayloadFunction<A, B> ) -> Spanned<ArgumentP<B>>
source§impl<A: AstPayload> AssignIdentPExt<A> for Spanned<AssignIdentP<A>>
impl<A: AstPayload> AssignIdentPExt<A> for Spanned<AssignIdentP<A>>
fn into_map_payload<B: AstPayload>( self, f: &mut impl AstPayloadFunction<A, B> ) -> Spanned<AssignIdentP<B>>
source§impl<A: AstPayload> AssignTargetPExt<A> for Spanned<AssignTargetP<A>>
impl<A: AstPayload> AssignTargetPExt<A> for Spanned<AssignTargetP<A>>
fn into_map_payload<B: AstPayload>( self, f: &mut impl AstPayloadFunction<A, B> ) -> Spanned<AssignTargetP<B>>
source§impl<A: AstPayload> ExprPExt<A> for Spanned<ExprP<A>>
impl<A: AstPayload> ExprPExt<A> for Spanned<ExprP<A>>
fn into_map_payload<B: AstPayload>( self, f: &mut impl AstPayloadFunction<A, B> ) -> Spanned<ExprP<B>>
source§impl<A: AstPayload> FStringPExt<A> for Spanned<FStringP<A>>
impl<A: AstPayload> FStringPExt<A> for Spanned<FStringP<A>>
fn into_map_payload<B: AstPayload>( self, f: &mut impl AstPayloadFunction<A, B> ) -> Spanned<FStringP<B>>
source§impl<A: AstPayload> IdentPExt<A> for Spanned<IdentP<A>>
impl<A: AstPayload> IdentPExt<A> for Spanned<IdentP<A>>
fn into_map_payload<B: AstPayload>( self, f: &mut impl AstPayloadFunction<A, B> ) -> Spanned<IdentP<B>>
source§impl<A: AstPayload> ParameterPExt<A> for Spanned<ParameterP<A>>
impl<A: AstPayload> ParameterPExt<A> for Spanned<ParameterP<A>>
fn into_map_payload<B: AstPayload>( self, f: &mut impl AstPayloadFunction<A, B> ) -> Spanned<ParameterP<B>>
source§impl<T: PartialEq> PartialEq for Spanned<T>
impl<T: PartialEq> PartialEq for Spanned<T>
source§impl<A: AstPayload> StmtPExt<A> for Spanned<StmtP<A>>
impl<A: AstPayload> StmtPExt<A> for Spanned<StmtP<A>>
fn into_map_payload<B: AstPayload>( self, f: &mut impl AstPayloadFunction<A, B> ) -> Spanned<StmtP<B>>
source§impl<A: AstPayload> TypeExprPExt<A> for Spanned<TypeExprP<A>>
impl<A: AstPayload> TypeExprPExt<A> for Spanned<TypeExprP<A>>
fn into_map_payload<B: AstPayload>( self, f: &mut impl AstPayloadFunction<A, B> ) -> Spanned<TypeExprP<B>>
impl<T: Copy> Copy for Spanned<T>
impl<T: Eq> Eq for Spanned<T>
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
§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
Checks if this value is equivalent to the given key. Read more
§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.