pub trait BinaryFile {
// Required methods
fn from_reader<R: Read>(reader: R) -> Result<Self>
where Self: Sized;
fn to_writer<W: Write>(&self, writer: W) -> Result<()>;
}
Expand description
Trait for any struct that can converted to and from a binary stream.
Required Methods§
Sourcefn from_reader<R: Read>(reader: R) -> Result<Self>where
Self: Sized,
fn from_reader<R: Read>(reader: R) -> Result<Self>where
Self: Sized,
Reads a binary stream and returns an instance of Self
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.
Implementors§
impl BinaryFile for Level
Available on crate features
dev-be-legacy-alpha
and be
only.