Skip to main content

Write

Trait Write 

Source
pub trait Write:
    Sized
    + DefinedAt
    + Notify {
    type Value: 'static;

    // Required methods
    fn try_write(&self) -> Option<impl UntrackableGuard>;
    fn try_write_untracked(&self) -> Option<impl DerefMut>;

    // Provided methods
    fn write(&self) -> impl UntrackableGuard { ... }
    fn write_untracked(&self) -> impl DerefMut { ... }
}
Expand description

Gives mutable access to a signal’s value through a guard type. When the guard is dropped, the signal’s subscribers will be notified.

Required Associated Types§

Source

type Value: 'static

The type of the signal’s value.

Required Methods§

Source

fn try_write(&self) -> Option<impl UntrackableGuard>

Returns the guard, or None if the signal has already been disposed.

Source

fn try_write_untracked(&self) -> Option<impl DerefMut>

or None if the signal has already been disposed.

Provided Methods§

Source

fn write(&self) -> impl UntrackableGuard

Returns the guard.

§Panics

Panics if you try to access a signal that has been disposed.

Source

fn write_untracked(&self) -> impl DerefMut

Returns a guard that will not notify subscribers when dropped.

§Panics

Panics if you try to access a signal that has been disposed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<Inner, Prev> Write for AtIndex<Inner, Prev>
where Inner: StoreField<Value = Prev>, Prev: IndexMut<usize> + 'static, <Prev as Index<usize>>::Output: Sized + 'static,

Source§

impl<Inner, Prev, K, T> Write for AtKeyed<Inner, Prev, K, T>
where K: Debug + Send + Sync + PartialEq + Eq + Hash + 'static, KeyedSubfield<Inner, Prev, K, T>: Clone, &'a T: for<'a> IntoIterator, Inner: StoreField<Value = Prev>, Prev: 'static, T: IndexMut<usize>, <T as Index<usize>>::Output: Sized + 'static,

Source§

impl<Inner, Prev, K, T> Write for KeyedSubfield<Inner, Prev, K, T>
where KeyedSubfield<Inner, Prev, K, T>: Clone, &'a T: for<'a> IntoIterator, T: 'static, Inner: StoreField<Value = Prev>, Prev: 'static, K: Debug + Send + Sync + PartialEq + Eq + Hash + 'static,

Source§

impl<Inner, Prev, T> Write for Subfield<Inner, Prev, T>
where T: 'static, Inner: StoreField<Value = Prev>, Prev: 'static,

Source§

impl<S> Write for DerefedField<S>
where S: StoreField, <S as StoreField>::Value: Deref + DerefMut, <<S as StoreField>::Value as Deref>::Target: Sized + 'static,

Source§

impl<T> Write for ArcField<T>

Source§

impl<T> Write for Field<T>

Source§

impl<T> Write for ArcStore<T>
where T: 'static,

Source§

impl<T, S> Write for Store<T, S>
where T: 'static, S: Storage<ArcStore<T>>,

Implementors§

Source§

impl<E> Write for NodeRef<E>
where E: ElementType, <E as ElementType>::Output: JsCast + Clone + 'static,

Source§

impl<T> Write for ArcAsyncDerived<T>
where T: 'static,

Source§

impl<T> Write for ArcLocalResource<T>
where T: 'static,

Source§

impl<T> Write for ArcMappedSignal<T>
where T: 'static,

Source§

type Value = T

Source§

impl<T> Write for ArcRwSignal<T>
where T: 'static,

Source§

type Value = T

Source§

impl<T> Write for ArcWriteSignal<T>
where T: 'static,

Source§

type Value = T

Source§

impl<T> Write for LocalResource<T>
where T: 'static,

Source§

impl<T> Write for MappedSignal<T>
where T: 'static,

Source§

type Value = T

Source§

impl<T, S> Write for AsyncDerived<T, S>
where T: 'static, S: Storage<ArcAsyncDerived<T>>,

Source§

impl<T, S> Write for RwSignal<T, S>
where T: 'static, S: Storage<ArcRwSignal<T>>,

Source§

type Value = T

Source§

impl<T, S> Write for WriteSignal<T, S>
where T: 'static, S: Storage<ArcWriteSignal<T>>,

Source§

type Value = T

Source§

impl<T, Ser> Write for ArcResource<T, Ser>
where T: 'static,

Source§

impl<T, Ser> Write for Resource<T, Ser>
where T: Send + Sync + 'static,