[−][src]Struct autumn::Meta
Structure to tag an object with a positional information
This can be used to associate any value with a particular Location
or
Span
within a source text.
Methods
impl<T, I> Meta<T, I>
[src]
pub fn inner(self) -> T
[src]
Unwrap the meta and return only the inner value
pub fn inner_ref(&self) -> &T
[src]
Get a reference to the inner value
pub fn inner_mut(&mut self) -> &mut T
[src]
Get a reference to the inner value
pub fn split(self) -> (T, I)
[src]
Split a meta into a separate value and location
pub fn map<A>(self, map: impl FnMut(T) -> A) -> Meta<A, I>
[src]
Map the value within the meta
impl<T, I: Clone> Meta<T, I>
[src]
pub fn as_ref(&self) -> Meta<&T, I>
[src]
Create a new meta referencing the original value
pub fn as_mut(&mut self) -> Meta<&mut T, I>
[src]
Create a new meta mutably referencing the original value
impl<T> Meta<T, Location>
[src]
Trait Implementations
impl<T: Clone, I: Clone> Clone for Meta<T, I>
[src]
impl<T: Copy, I: Copy> Copy for Meta<T, I>
[src]
impl<T: Debug, I: Debug> Debug for Meta<T, I>
[src]
impl<T, I> Deref for Meta<T, I>
[src]
impl<T, I> DerefMut for Meta<T, I>
[src]
impl<T: Display, I: Display> Display for Meta<T, I>
[src]
impl<T: Eq, I: Eq> Eq for Meta<T, I>
[src]
impl<T, I> Error for Meta<T, I> where
T: Error,
I: Display + Debug,
[src]
T: Error,
I: Display + Debug,
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn description(&self) -> &str
1.0.0[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl<T: Ord, I: Ord> Ord for Meta<T, I>
[src]
fn cmp(&self, other: &Meta<T, I>) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T, E, P: Parser<T, E>> Parser<Meta<T, Span>, E> for MetaMap<P, E>
[src]
impl<T: PartialEq, I: PartialEq> PartialEq<Meta<T, I>> for Meta<T, I>
[src]
impl<T: PartialOrd, I: PartialOrd> PartialOrd<Meta<T, I>> for Meta<T, I>
[src]
fn partial_cmp(&self, other: &Meta<T, I>) -> Option<Ordering>
[src]
fn lt(&self, other: &Meta<T, I>) -> bool
[src]
fn le(&self, other: &Meta<T, I>) -> bool
[src]
fn gt(&self, other: &Meta<T, I>) -> bool
[src]
fn ge(&self, other: &Meta<T, I>) -> bool
[src]
impl<T, I> StructuralEq for Meta<T, I>
[src]
impl<T, I> StructuralPartialEq for Meta<T, I>
[src]
Auto Trait Implementations
impl<T, I> RefUnwindSafe for Meta<T, I> where
I: RefUnwindSafe,
T: RefUnwindSafe,
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, I> Send for Meta<T, I> where
I: Send,
T: Send,
I: Send,
T: Send,
impl<T, I> Sync for Meta<T, I> where
I: Sync,
T: Sync,
I: Sync,
T: Sync,
impl<T, I> Unpin for Meta<T, I> where
I: Unpin,
T: Unpin,
I: Unpin,
T: Unpin,
impl<T, I> UnwindSafe for Meta<T, I> where
I: UnwindSafe,
T: UnwindSafe,
I: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,