Trait GetValue
pub trait GetValue: DefinedAt {
type Value: Clone;
// Required method
fn try_get_value(&self) -> Option<Self::Value>;
// Provided method
fn get_value(&self) -> Self::Value { ... }
}
Expand description
A variation of the Get
trait that provides a signposted “always-non-reactive” API.
E.g. for StoredValue
.
Required Associated Types§
Required Methods§
fn try_get_value(&self) -> Option<Self::Value>
fn try_get_value(&self) -> Option<Self::Value>
Clones and returns the value of the value, non-reactively,
or None
if the value has already been disposed.