pub enum RantVar {
ByVal(RantValue),
ByValConst(RantValue),
ByRef(Rc<RefCell<RantValue>>),
ByRefConst(Rc<RantValue>),
}
Expand description
Represents a Rant variable of one of two flavors: by-value or by-reference.
Cloning
The Clone
implementation for this type does not copy any data in ByRef*
variants; it only copies the reference.
Variants
ByVal(RantValue)
Tuple Fields
0: RantValue
By-value variable
ByValConst(RantValue)
Tuple Fields
0: RantValue
By-value constant
ByRef(Rc<RefCell<RantValue>>)
By-ref variable
ByRefConst(Rc<RantValue>)
By-ref constant
Implementations
Converts the variable to its by-reference counterpart.
Attempts to write the specified value to the variable.
If the variable is a constant, returns false
; otherwise, returns true
.
Returns an immutable reference to the contained value.
Returns a copy of the variable value.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for RantVar
impl !UnwindSafe for RantVar
Blanket Implementations
Mutably borrows from an owned value. Read more