pub struct LRc<T: ?Sized> {
pub exp: Rc<T>,
pub line: u32,
pub column: u32,
}Expand description
Fields§
§exp: Rc<T>§line: u32§column: u32Implementations§
Source§impl<T> LRc<T>
impl<T> LRc<T>
pub fn new(e: T, ln: usize, col: usize) -> LRc<T>
Sourcepub fn transfer<U>(&self, e: U) -> LRc<U>
pub fn transfer<U>(&self, e: U) -> LRc<U>
should be used to create a new LRc-expression that inherits lexical information from existing LRc
Sourcepub fn clone(lrc: &LRc<T>) -> LRc<T>
pub fn clone(lrc: &LRc<T>) -> LRc<T>
uses Rc::clone to increase reference count of encapsulated Rc, copies line, column and source_id information.
pub fn line(&self) -> usize
pub fn column(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for LRc<T>where
T: ?Sized,
impl<T> RefUnwindSafe for LRc<T>where
T: RefUnwindSafe + ?Sized,
impl<T> !Send for LRc<T>
impl<T> !Sync for LRc<T>
impl<T> Unpin for LRc<T>where
T: ?Sized,
impl<T> UnwindSafe for LRc<T>where
T: RefUnwindSafe + ?Sized,
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