pub struct Loc<T>(/* private fields */);Expand description
Represents a T with a Location.
This is commonly used to represent bits of a parse tree, remembering where they came from in the source code.
Loc::unwrap(self) or *self unwraps the T. Loc::location(&self)
returns the Location.
Implementations§
Trait Implementations§
impl<T: Copy> Copy for Loc<T>
Auto Trait Implementations§
impl<T> Freeze for Loc<T>where
T: Freeze,
impl<T> RefUnwindSafe for Loc<T>where
T: RefUnwindSafe,
impl<T> Send for Loc<T>where
T: Send,
impl<T> Sync for Loc<T>where
T: Sync,
impl<T> Unpin for Loc<T>where
T: Unpin,
impl<T> UnwindSafe for Loc<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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)