pub trait Format {
type Output<T>;
type Input<T>: ?Sized;
// Required methods
fn deserialise<T>(rdr: &mut dyn Read) -> Result<Self::Output<T>>
where for<'de> T: Deserialize<'de>;
fn serialise<T>(wtr: &mut dyn Write, val: &Self::Input<T>) -> Result<()>
where T: Serialize;
}
Expand description
Required Associated Types§
Required Methods§
Sourcefn deserialise<T>(rdr: &mut dyn Read) -> Result<Self::Output<T>>where
for<'de> T: Deserialize<'de>,
fn deserialise<T>(rdr: &mut dyn Read) -> Result<Self::Output<T>>where
for<'de> T: Deserialize<'de>,
Deserialise from rdr
into Output
.
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.