[][src]Enum rant::RantVar

pub enum RantVar {
    ByVal(RantValue),
    ByRef(Rc<RefCell<RantValue>>),
}

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. If you want to make a copy of the data in a Local regardless of its variant, use the .cloned() method.

Variants

ByVal(RantValue)

Implementations

impl RantVar[src]

pub fn cloned(&self) -> Self[src]

Creates a copy of the Local and any data inside of it, even if it is by-ref.

pub fn is_by_val(&self) -> bool[src]

pub fn is_by_ref(&self) -> bool[src]

pub fn make_by_ref(&mut self)[src]

pub fn write(&mut self, value: RantValue)[src]

pub fn value_ref(&self) -> impl Deref<Target = RantValue> + '_[src]

pub fn value_cloned(&self) -> RantValue[src]

Trait Implementations

impl Clone for RantVar[src]

fn clone(&self) -> Self[src]

Creates a copy of the Local, preserving references.

impl Debug for RantVar[src]

impl Default for RantVar[src]

Auto Trait Implementations

impl !RefUnwindSafe for RantVar

impl !Send for RantVar

impl !Sync for RantVar

impl Unpin for RantVar

impl !UnwindSafe for RantVar

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,