Struct futures_signals::signal::Mutable
source · #[repr(transparent)]pub struct Mutable<A>(_);
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) -> Awhere F: FnOnce(&mut A) -> A,
pub fn swap(&self, other: &Mutable<A>)
pub fn set(&self, value: A)
pub fn set_if<F>(&self, value: A, f: F)where F: FnOnce(&A, &A) -> bool,
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>where F: FnMut(&A) -> B,
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> RefUnwindSafe for Mutable<A>
impl<A> Send for Mutable<A>where A: Send + Sync,
impl<A> Sync for Mutable<A>where A: Send + Sync,
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