Trait cvar::Variable [] [src]

pub trait Variable<T> where
    T: Debug
{ fn get(&self) -> T; fn set(&self, val: T); fn with<R, F>(&self, f: F) -> R
    where
        F: FnOnce(&T) -> R
; }

Abstraction over interior mutability.

Required Methods

Gets a clone of the value.

Sets a new value.

Work with the value without a potentially expensive clone.

Implementors