pub trait TestInput: Sized {
type Err: Error;
// Required method
fn try_read_from(data: &[u8]) -> Result<Self, Self::Err>;
// Provided method
fn read_from(data: &[u8]) -> Self { ... }
}Required Associated Types§
Required Methods§
fn try_read_from(data: &[u8]) -> Result<Self, Self::Err>
Provided Methods§
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.