pub trait ReadValue: Sized + DefinedAt {
type Value: Deref;
// Required method
fn try_read_value(&self) -> Option<Self::Value>;
// Provided method
fn read_value(&self) -> Self::Value { ... }
}Expand description
A variation of the Read trait that provides a signposted “always-non-reactive” API.
E.g. for StoredValue.
Required Associated Types§
Required Methods§
Sourcefn try_read_value(&self) -> Option<Self::Value>
fn try_read_value(&self) -> Option<Self::Value>
Returns the non-reactive guard, or None if the value has already been disposed.
Provided Methods§
Sourcefn read_value(&self) -> Self::Value
fn read_value(&self) -> Self::Value
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.