Trait immeta::LoadableMetadata
[−]
[src]
pub trait LoadableMetadata: Sized { fn load<R: ?Sized + Read>(r: &mut R) -> Result<Self>; fn load_from_file<P: AsRef<Path>>(path: P) -> Result<Self> { ... } fn load_from_buf(buf: &[u8]) -> Result<Self> { ... } }
Provides several convenience functions for loading metadata from various sources.
Required Methods
fn load<R: ?Sized + Read>(r: &mut R) -> Result<Self>
Loads the implementing type from the given input stream.
Provided Methods
fn load_from_file<P: AsRef<Path>>(path: P) -> Result<Self>
Loads the implementing type from a file specified by the given path.
Delegates to load<R: Read>(&mut R)
method.
fn load_from_buf(buf: &[u8]) -> Result<Self>
Loads the implementing type from an in-memory buffer.
Delegates to load<R: Read>(&mut R)
method.