pub trait WriteValue: Sized + DefinedAt {
type Value: 'static;
// Required method
fn try_write_value(&self) -> Option<UntrackedWriteGuard<Self::Value>>;
// Provided method
fn write_value(&self) -> UntrackedWriteGuard<Self::Value> { ... }
}Expand description
A variation of the Write trait that provides a signposted “always-non-reactive” API.
E.g. for StoredValue.
Required Associated Types§
Required Methods§
Sourcefn try_write_value(&self) -> Option<UntrackedWriteGuard<Self::Value>>
fn try_write_value(&self) -> Option<UntrackedWriteGuard<Self::Value>>
Returns a non-reactive write guard, or None if the value has already been disposed.
Provided Methods§
Sourcefn write_value(&self) -> UntrackedWriteGuard<Self::Value>
fn write_value(&self) -> UntrackedWriteGuard<Self::Value>
Returns a non-reactive write guard.
§Panics
Panics if you try to access a value that has been disposed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".