Struct kailua_env::Spanned
[−]
[src]
pub struct Spanned<T> { pub span: Span, pub base: T, }
A value with optional Span
.
Can be constructed with .with_loc(span)
or .without_loc()
from the WithLoc
trait.
Fields
span: Span
base: T
Methods
impl<T> Spanned<T>
[src]
Trait Implementations
impl<T: Copy> Copy for Spanned<T>
[src]
impl<T: Clone> Clone for Spanned<T>
[src]
fn clone(&self) -> Spanned<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: PartialEq> PartialEq for Spanned<T>
[src]
fn eq(&self, __arg_0: &Spanned<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Spanned<T>) -> bool
This method tests for !=
.
impl<T: Eq> Eq for Spanned<T>
[src]
impl<T> Deref for Spanned<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<T> DerefMut for Spanned<T>
[src]
fn deref_mut(&mut self) -> &mut T
The method called to mutably dereference a value
impl<T> Borrow<T> for Spanned<T>
[src]
impl<T: Display> Display for Spanned<T>
[src]
The span is ignored in the display.
impl<T: Debug> Debug for Spanned<T>
[src]
The span is only printed (after the value) when the alternate flag is enabled.