[][src]Struct bve::parse::Span

pub struct Span {
    pub line: Option<u64>,
}

File location for errors/ast nodes

Does not contain file information because they are already associated with an attempt to parse a file.

Fields

line: Option<u64>

Line of the location

May be empty if there is no reasonable way to create a span for a construct. Empty spans generally should not be exposed to the user.

Methods

impl Span[src]

#[must_use] pub const fn new() -> Self[src]

#[must_use] pub const fn none() -> Self[src]

#[must_use] pub fn from_line(line: impl ToPrimitive + Copy) -> Self[src]

Trait Implementations

impl Clone for Span[src]

impl Copy for Span[src]

impl Debug for Span[src]

impl Eq for Span[src]

impl<'a> From<Option<&'a Position>> for Span[src]

impl PartialEq<Span> for Span[src]

impl StructuralEq for Span[src]

impl StructuralPartialEq for Span[src]

Auto Trait Implementations

impl RefUnwindSafe for Span

impl Send for Span

impl Sync for Span

impl Unpin for Span

impl UnwindSafe for Span

Blanket Implementations

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

impl<T> AnyEq for T where
    T: PartialEq<T> + Any

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

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<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.