Struct nu_source::Tag [−][src]
pub struct Tag {
pub anchor: Option<AnchorLocation>,
pub span: Span,
}Expand description
The set of metadata that can be associated with a value
Fields
anchor: Option<AnchorLocation>The original source for this value
span: SpanThe span in the source text for the command that created this value
Implementations
Constructs a new Tag.
Creates a Tag from the given Span with no AnchorLocation
Creates a Tag from the given AnchorLocation for a span with a length of 1.
Creates a Tag for the given AnchorLocation with unknown Span position.
Returns the AnchorLocation of the current Tag
Merges the current Tag with the given optional Tag.
Both Tags must share the same AnchorLocation.
The resulting Tag will have a Span that starts from the current Tag and ends at Span of the given Tag.
Should the None variant be passed in, a new Tag with the same Span and AnchorLocation will be returned.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Tag
impl UnwindSafe for Tag
Blanket Implementations
Mutably borrows from an owned value. Read more