[][src]Struct nu_source::Tag

pub struct Tag {
    pub anchor: Option<AnchorLocation>,
    pub span: Span,
}

Fields

anchor: Option<AnchorLocation>span: Span

Methods

impl Tag[src]

pub fn new(anchor: Option<AnchorLocation>, span: Span) -> Self[src]

Constructs a new Tag.

impl Tag[src]

pub fn unknown_anchor(span: Span) -> Tag[src]

pub fn for_char(pos: usize, anchor: AnchorLocation) -> Tag[src]

pub fn unknown_span(anchor: AnchorLocation) -> Tag[src]

pub fn unknown() -> Tag[src]

pub fn anchor(&self) -> Option<AnchorLocation>[src]

pub fn until(&self, other: impl Into<Tag>) -> Tag[src]

pub fn until_option(&self, other: Option<impl Into<Tag>>) -> Tag[src]

pub fn slice<'a>(&self, source: &'a str) -> &'a str[src]

pub fn string<'a>(&self, source: &'a str) -> String[src]

pub fn tagged_slice<'a>(&self, source: &'a str) -> Tagged<&'a str>[src]

pub fn tagged_string<'a>(&self, source: &'a str) -> Tagged<String>[src]

pub fn anchor_name(&self) -> Option<String>[src]

Trait Implementations

impl<'_> From<&'_ Tag> for Tag[src]

impl From<Span> for Tag[src]

impl<'_> From<&'_ Span> for Tag[src]

impl From<(usize, usize, TracableContext)> for Tag[src]

impl From<(usize, usize, AnchorLocation)> for Tag[src]

impl From<(usize, usize, Option<AnchorLocation>)> for Tag[src]

impl<'_> From<LocatedSpanEx<&'_ str, TracableContext>> for Tag[src]

impl From<Tag> for Span[src]

impl<'_> From<&'_ Tag> for Span[src]

impl Clone for Tag[src]

impl Eq for Tag[src]

impl Ord for Tag[src]

impl PartialEq<Tag> for Tag[src]

impl PartialOrd<Tag> for Tag[src]

impl Debug for Tag[src]

impl Hash for Tag[src]

impl StructuralPartialEq for Tag[src]

impl StructuralEq for Tag[src]

impl Serialize for Tag[src]

impl<'de> Deserialize<'de> for Tag[src]

Auto Trait Implementations

impl Send for Tag

impl Sync for Tag

impl Unpin for Tag

impl UnwindSafe for Tag

impl RefUnwindSafe for Tag

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]