[][src]Struct wast::Span

pub struct Span { /* fields omitted */ }

A position in the original source stream, used to render errors.


impl Span[src]

pub fn linecol_in(&self, text: &str) -> (usize, usize)[src]

Returns the line/column information of this span within text. Line and column numbers are 0-indexed. User presentation is typically 1-indexed, but 0-indexing is appropriate for internal use with iterators and slices.

Trait Implementations

impl Clone for Span[src]

impl Copy for Span[src]

impl Debug for Span[src]

Auto Trait Implementations

impl Send for Span

impl Sync for Span

impl Unpin for Span

impl UnwindSafe for Span

impl RefUnwindSafe for Span

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 

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

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<T> BorrowMut<T> for T where
    T: ?Sized

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