pub struct Spanned<T> { /* private fields */ }
Expand description
A spanned value, indicating the range at which it is defined in the source.
Implementations§
source§impl<T> Spanned<T>
impl<T> Spanned<T>
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the spanned value and returns the contained value.
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<D>(
deserializer: D
) -> Result<Spanned<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<Spanned<T>, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T> Ord for Spanned<T>where
T: Ord,
impl<T> Ord for Spanned<T>where T: Ord,
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T> PartialEq<Spanned<T>> for Spanned<T>where
T: PartialEq<T>,
impl<T> PartialEq<Spanned<T>> for Spanned<T>where T: PartialEq<T>,
source§impl<T> PartialOrd<Spanned<T>> for Spanned<T>where
T: PartialOrd<T>,
impl<T> PartialOrd<Spanned<T>> for Spanned<T>where T: PartialOrd<T>,
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 moresource§impl<T> Serialize for Spanned<T>where
T: Serialize,
impl<T> Serialize for Spanned<T>where T: Serialize,
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> Eq for Spanned<T>where T: Eq,
Auto Trait Implementations§
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
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.