Struct juniper::Spanning [−][src]
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
Expand description
The wrapped item
start: SourcePosition
Expand description
Start position of the item
end: SourcePosition
Expand description
End position of the item
This points to the first source position after the wrapped item.
Implementations
Trait Implementations
impl<T: Error> Error for Spanning<T>
[src]
impl<T: Error> Error for Spanning<T>
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl<'a> From<Spanning<ParseError<'a>>> for GraphQLError<'a>
[src]
impl<'a> From<Spanning<ParseError<'a>>> for GraphQLError<'a>
[src]fn from(f: Spanning<ParseError<'a>>) -> GraphQLError<'a>
[src]
fn from(f: Spanning<ParseError<'a>>) -> GraphQLError<'a>
[src]Performs the conversion.
impl<'a> Serialize for Spanning<ParseError<'a>>
[src]
impl<'a> Serialize for Spanning<ParseError<'a>>
[src]impl<T: Copy> Copy for Spanning<T>
[src]
impl<T: Eq> Eq for Spanning<T>
[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,
T: RefUnwindSafe,
impl<T> Send for Spanning<T> where
T: Send,
T: Send,
impl<T> Sync for Spanning<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Spanning<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Spanning<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,