Struct source_span::Loc [−][src]
pub struct Loc<T: ?Sized> { /* fields omitted */ }
Expand description
Located data.
This is a simple wrapper around data that can be located in a source file. It is useful to wrap abstract syntax tree nodes.
It derefs into the inner value.
Implementations
Associate a span location to some data by wrapping it under Loc
.
Maps the inner value using the given function.
Convert the inner value.
Tries to map the inner value using the given function.
Try to convert the inner value.
Unwrap the data.
Transforms a Option<Loc<T>>
into a Loc<Option<T>>
.
If the input is None
then this function returns Loc::new(None, span)
.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for Loc<T> where
T: RefUnwindSafe,
impl<T: ?Sized> UnwindSafe for Loc<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more