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§
Required Methods§
Sourcefn try_write(&self) -> Option<impl UntrackableGuard>
fn try_write(&self) -> Option<impl UntrackableGuard>
Returns the guard, or None if the signal has already been disposed.
Sourcefn try_write_untracked(&self) -> Option<impl DerefMut>
fn try_write_untracked(&self) -> Option<impl DerefMut>
or None if the signal has already been disposed.
Provided Methods§
Sourcefn write(&self) -> impl UntrackableGuard
fn write(&self) -> impl UntrackableGuard
Sourcefn write_untracked(&self) -> impl DerefMut
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.