pub struct Mutable<A>(/* private fields */);
Implementations§
Source§impl<A> Mutable<A>
impl<A> Mutable<A>
pub fn new(value: A) -> Self
pub fn read_only(&self) -> ReadOnlyMutable<A>
pub fn replace(&self, value: A) -> A
pub fn replace_with<F>(&self, f: F) -> A
pub fn swap(&self, other: &Mutable<A>)
pub fn set(&self, value: A)
pub fn set_if<F>(&self, value: A, f: F)
pub fn lock_mut(&self) -> MutableLockMut<'_, A>
Methods from Deref<Target = ReadOnlyMutable<A>>§
pub fn lock_ref(&self) -> MutableLockRef<'_, A>
pub fn signal_ref<B, F>(&self, f: F) -> MutableSignalRef<A, F>
pub fn get(&self) -> A
pub fn signal(&self) -> MutableSignal<A>
pub fn get_cloned(&self) -> A
pub fn signal_cloned(&self) -> MutableSignalCloned<A>
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Mutable<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Mutable<T>where
T: Deserialize<'de>,
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<A> Freeze for Mutable<A>
impl<A> RefUnwindSafe for Mutable<A>
impl<A> Send for Mutable<A>
impl<A> Sync for Mutable<A>
impl<A> Unpin for Mutable<A>
impl<A> UnwindSafe for Mutable<A>
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