pub struct Variable<T>{ /* private fields */ }Expand description
A variable. When the value is changed, it will update the computation.
Variable are created like this:
let v1: Variable<i32> = 1.into();
let v2 = Variable::<u32>::new(2);Implementations§
Source§impl<T> Variable<T>
impl<T> Variable<T>
Sourcepub fn read_value(&self) -> RwLockReadGuard<'_, T>
pub fn read_value(&self) -> RwLockReadGuard<'_, T>
Get the value as a ref (keep the value locked)
Trait Implementations§
Source§impl<T> PartialOrd for Variable<T>
impl<T> PartialOrd for Variable<T>
Source§impl<T> PartialOrd<T> for Variable<T>
impl<T> PartialOrd<T> for Variable<T>
Auto Trait Implementations§
impl<T> Freeze for Variable<T>
impl<T> RefUnwindSafe for Variable<T>
impl<T> Send for Variable<T>
impl<T> Sync for Variable<T>
impl<T> Unpin for Variable<T>
impl<T> UnsafeUnpin for Variable<T>
impl<T> UnwindSafe for Variable<T>
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