pub struct LRc<T: ?Sized> {
    pub exp: Rc<T>,
    pub line: u32,
    pub column: u32,
}
Expand description

Like LBox but encapsulates an Rc. Implements Deref and emulates the Rc::clone function.

Fields

exp: Rc<T>line: u32column: u32

Implementations

should be used to create a new LRc-expression that inherits lexical information from existing LRc

uses Rc::clone to increase reference count of encapsulated Rc, copies line, column and source_id information.

emulates LRc::downcast function. Note that unlike Box::downcast, an Option is returned here instead of a result.

upcasts LRc<T> to LRc<dyn Any>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

this is required if LRc<dyn Any> is used for the abstract syntax type

Returns the “default value” for a type. Read more

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.