pub struct Spanning<T> {
pub item: T,
pub start: SourcePosition,
pub end: SourcePosition,
}
Expand description
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.
Implementations
Trait Implementations
sourceimpl<'a> From<Spanning<ParseError<'a>>> for GraphQLError<'a>
impl<'a> From<Spanning<ParseError<'a>>> for GraphQLError<'a>
sourcefn from(f: Spanning<ParseError<'a>>) -> GraphQLError<'a>
fn from(f: Spanning<ParseError<'a>>) -> GraphQLError<'a>
Converts to this type from the input type.
sourceimpl<T: PartialEq> PartialEq<Spanning<T>> for Spanning<T>
impl<T: PartialEq> PartialEq<Spanning<T>> for Spanning<T>
sourceimpl<'a> Serialize for Spanning<ParseError<'a>>
impl<'a> Serialize for Spanning<ParseError<'a>>
impl<T: Copy> Copy for Spanning<T>
impl<T: Eq> Eq for Spanning<T>
impl<T> StructuralEq for Spanning<T>
impl<T> StructuralPartialEq for Spanning<T>
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.