[−][src]Struct asciifile::spanned::Spanned
Fields
span: Span<'f>
data: T
Methods
impl<'f, T> Spanned<'f, T>
[src]
impl<'f, T> Spanned<'f, T>
pub fn new(span: Span<'f>, value: T) -> Self
[src]
pub fn new(span: Span<'f>, value: T) -> Self
pub fn map<U, F>(self, f: F) -> Spanned<'f, U> where
F: FnOnce(T) -> U,
[src]
pub fn map<U, F>(self, f: F) -> Spanned<'f, U> where
F: FnOnce(T) -> U,
pub fn map_ref<U, F>(&self, f: F) -> Spanned<'f, U> where
F: FnOnce(&T) -> U,
[src]
pub fn map_ref<U, F>(&self, f: F) -> Spanned<'f, U> where
F: FnOnce(&T) -> U,
pub fn combine_with<Rhs, Res, F>(
self,
rhs: Spanned<'f, Rhs>,
f: F
) -> Spanned<'f, Res> where
F: FnOnce(Self, Spanned<'f, Rhs>) -> Res,
[src]
pub fn combine_with<Rhs, Res, F>(
self,
rhs: Spanned<'f, Rhs>,
f: F
) -> Spanned<'f, Res> where
F: FnOnce(Self, Spanned<'f, Rhs>) -> Res,
Combine two Spanned
s, aplying f
to compute the contents of the new
Spanned
. There are also variants of this where LHS/Self, RHS, or both
are boxed. These are necassary to avoid reallocation when calling this.
pub fn combine_with_boxed<Rhs, Res, F>(
self,
rhs: Box<Spanned<'f, Rhs>>,
f: F
) -> Spanned<'f, Res> where
F: FnOnce(Self, Box<Spanned<'f, Rhs>>) -> Res,
[src]
pub fn combine_with_boxed<Rhs, Res, F>(
self,
rhs: Box<Spanned<'f, Rhs>>,
f: F
) -> Spanned<'f, Res> where
F: FnOnce(Self, Box<Spanned<'f, Rhs>>) -> Res,
pub fn combine_boxed_with<Rhs, Res, F>(
self: Box<Self>,
rhs: Spanned<'f, Rhs>,
f: F
) -> Spanned<'f, Res> where
F: FnOnce(Box<Self>, Spanned<'f, Rhs>) -> Res,
[src]
pub fn combine_boxed_with<Rhs, Res, F>(
self: Box<Self>,
rhs: Spanned<'f, Rhs>,
f: F
) -> Spanned<'f, Res> where
F: FnOnce(Box<Self>, Spanned<'f, Rhs>) -> Res,
pub fn combine_boxed_with_boxed<Rhs, Res, F>(
self: Box<Self>,
rhs: Box<Spanned<'f, Rhs>>,
f: F
) -> Spanned<'f, Res> where
F: FnOnce(Box<Self>, Box<Spanned<'f, Rhs>>) -> Res,
[src]
pub fn combine_boxed_with_boxed<Rhs, Res, F>(
self: Box<Self>,
rhs: Box<Spanned<'f, Rhs>>,
f: F
) -> Spanned<'f, Res> where
F: FnOnce(Box<Self>, Box<Spanned<'f, Rhs>>) -> Res,
Trait Implementations
impl<'f, T> PartialEq<Spanned<'f, T>> for Spanned<'f, T> where
T: PartialEq,
[src]
impl<'f, T> PartialEq<Spanned<'f, T>> for Spanned<'f, T> where
T: PartialEq,
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This only compares the data
! I.e. two Spanned
s are equal even if
they point to two different spans in the source file, as long as the
content is the same.
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl<'f, T: Clone> Clone for Spanned<'f, T>
[src]
impl<'f, T: Clone> Clone for Spanned<'f, T>
fn clone(&self) -> Spanned<'f, T>
[src]
fn clone(&self) -> Spanned<'f, T>
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<'f, T> Eq for Spanned<'f, T> where
T: Eq,
[src]
impl<'f, T> Eq for Spanned<'f, T> where
T: Eq,
impl<T, '_> Display for Spanned<'_, T> where
T: Display,
[src]
impl<T, '_> Display for Spanned<'_, T> where
T: Display,
impl<'f, T: Debug> Debug for Spanned<'f, T>
[src]
impl<'f, T: Debug> Debug for Spanned<'f, T>
impl<'f, T> Deref for Spanned<'f, T>
[src]
impl<'f, T> Deref for Spanned<'f, T>
Auto Trait Implementations
impl<'f, T> Send for Spanned<'f, T> where
T: Send,
impl<'f, T> Send for Spanned<'f, T> where
T: Send,
impl<'f, T> Sync for Spanned<'f, T> where
T: Sync,
impl<'f, T> Sync for Spanned<'f, T> where
T: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId