pub trait ReadOption<Ctx> {
// Required method
fn read_option_with<T, E, F>(&mut self, f: F) -> Result<Option<T>, E>
where E: From<Error>,
F: FnMut(&mut Reader<'_, Ctx>) -> Result<T, E>;
// Provided method
fn read_option<T>(&mut self) -> Result<Option<T>, T::Error>
where T: Decode<Ctx> { ... }
}Expand description
A trait for types that can be read from a Reader as an Option.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".