SignalWrite

Trait SignalWrite 

Source
pub trait SignalWrite<T> {
    // Required methods
    fn id(&self) -> Id;
    fn try_write(&self) -> Option<WriteRef<'_, T>>
       where T: 'static;

    // Provided method
    fn write(&self) -> WriteRef<'_, T>
       where T: 'static { ... }
}

Required Methods§

Source

fn id(&self) -> Id

get the Signal Id

Source

fn try_write(&self) -> Option<WriteRef<'_, T>>
where T: 'static,

If the Signal isn’t disposed, mutably borrows the signal value.

Provided Methods§

Source

fn write(&self) -> WriteRef<'_, T>
where T: 'static,

Mutably borrows the signal value, triggering subscribers when dropped.

Implementors§

Source§

impl<T> SignalWrite<T> for RwSignal<T, UnsyncStorage>

Source§

impl<T> SignalWrite<T> for WriteSignal<T, UnsyncStorage>

Source§

impl<T: Send + Sync> SignalWrite<T> for RwSignal<T, SyncStorage>

Source§

impl<T: Send + Sync> SignalWrite<T> for WriteSignal<T, SyncStorage>