Trait ReadOptional
pub trait ReadOptional: DefinedAt {
type Value;
// Required method
fn try_read(&self) -> Option<Self::Value>;
// Provided method
fn read(&self) -> Self::Value { ... }
}Expand description
An alternative Read trait that works with Option<Readable> types.
Required Associated Types§
type Value
type Value
The guard type that will be returned, which can be dereferenced to the value.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".