[][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: Clone> Clone for Spanning<T>[src]

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

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

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

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

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

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

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

impl<T> StructuralEq for Spanning<T>[src]

impl<T> StructuralPartialEq for Spanning<T>[src]

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

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.