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§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".