[][src]Struct juniper::parser::Spanning

pub struct Spanning<T> {
    pub item: T,
    pub start: SourcePosition,
    pub end: SourcePosition,
}

Data structure used to wrap items with start and end markers in the input source

A "span" is a range of characters in the input source, starting at the character pointed by the start field and ending just before the end marker.

Fields

item: T

The wrapped item

start: SourcePosition

Start position of the item

end: SourcePosition

End position of the item

This points to the first source position after the wrapped item.

Methods

impl<T> Spanning<T>[src]

pub fn map<O: Debug, F: Fn(T) -> O>(self, f: F) -> Spanning<O>[src]

Modify the contents of the spanned item

Trait Implementations

impl<T: PartialEq> PartialEq<Spanning<T>> for Spanning<T>[src]

impl<T: Clone> Clone for Spanning<T>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> From<Spanning<ParseError<'a>>> for GraphQLError<'a>[src]

impl<T: Eq> Eq for Spanning<T>[src]

impl<T: Copy> Copy for Spanning<T>[src]

impl<T: Debug> Debug for Spanning<T>[src]

impl<T: Hash> Hash for Spanning<T>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a> Serialize for Spanning<ParseError<'a>>[src]

Auto Trait Implementations

impl<T> Send for Spanning<T> where
    T: Send

impl<T> Sync for Spanning<T> where
    T: Sync

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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