pub trait OwnableBinReader<'r>: BinReader<'r> {
// Required methods
fn from_file_with_offset<P: AsRef<Path>>(
path: P,
initial_offset: usize,
endidness: Endidness,
) -> Result<Self>;
fn from_bytes_with_offset(
bytes: Bytes,
initial_offset: usize,
endidness: Endidness,
) -> Result<Self>;
// Provided methods
fn from_file<P: AsRef<Path>>(path: P, endidness: Endidness) -> Result<Self> { ... }
fn from_bytes(bytes: Bytes, endidness: Endidness) -> Result<Self> { ... }
}Expand description
An implementor of OwnableBinReader owns the data contained within it. This means that they
can be built from more from more source (such as a bytes::Bytes instance of a file.
Required Methods§
fn from_file_with_offset<P: AsRef<Path>>( path: P, initial_offset: usize, endidness: Endidness, ) -> Result<Self>
fn from_bytes_with_offset( bytes: Bytes, initial_offset: usize, endidness: Endidness, ) -> Result<Self>
Provided Methods§
fn from_file<P: AsRef<Path>>(path: P, endidness: Endidness) -> Result<Self>
fn from_bytes(bytes: Bytes, endidness: Endidness) -> Result<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.