pub struct Spanned<T> {
pub value: T,
pub span: Span,
}
Expand description
An arbitrary T
with additional span information
Fields§
§value: T
The value
span: Span
The span information for the value
Implementations§
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Spanned<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Spanned<T>where
T: Deserialize<'de>,
source§fn deserialize(value: &mut Value<'de>) -> Result<Self, DeserError>
fn deserialize(value: &mut Value<'de>) -> Result<Self, DeserError>
Given a mutable
Value
, allows you to deserialize the type from it,
or accumulate 1 or more errorssource§impl<T> Ord for Spanned<T>where
T: Ord,
impl<T> Ord for Spanned<T>where
T: Ord,
source§impl<T> PartialEq for Spanned<T>where
T: PartialEq,
impl<T> PartialEq for Spanned<T>where
T: PartialEq,
source§impl<T> PartialOrd for Spanned<T>where
T: PartialOrd,
impl<T> PartialOrd for Spanned<T>where
T: PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T> Eq for Spanned<T>where
T: Eq,
Auto Trait Implementations§
impl<T> Freeze for Spanned<T>where
T: Freeze,
impl<T> RefUnwindSafe for Spanned<T>where
T: RefUnwindSafe,
impl<T> Send for Spanned<T>where
T: Send,
impl<T> Sync for Spanned<T>where
T: Sync,
impl<T> Unpin for Spanned<T>where
T: Unpin,
impl<T> UnwindSafe for Spanned<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more