Struct webc::v2::read::OwnedReader
source · pub struct OwnedReader { /* private fields */ }
Expand description
A reader for owned data that is already in memory.
Implementations§
source§impl OwnedReader
impl OwnedReader
pub fn parse(webc: impl Into<OwnedBuffer>) -> Result<Self, OwnedReaderError>
pub fn from_path(path: impl AsRef<Path>) -> Result<Self, OwnedReaderError>
sourcepub fn from_file(file: File) -> Result<Self, OwnedReaderError>
pub fn from_file(file: File) -> Result<Self, OwnedReaderError>
Try to parse a File
into an OwnedReader
.
This will try to memory-map the file if supported by the OS, otherwise it will read the entire file into memory.
pub fn manifest(&self) -> &Manifest
pub fn index(&self) -> &Index
pub fn atom_names(&self) -> impl Iterator<Item = &str> + '_
pub fn iter_atoms(&self) -> impl Iterator<Item = (&str, &OwnedBuffer)> + '_
pub fn get_atom(&self, name: &str) -> Option<&OwnedBuffer>
pub fn volume_names(&self) -> impl Iterator<Item = &str> + '_
pub fn iter_volumes( &self ) -> impl Iterator<Item = Result<(&str, VolumeSection), OwnedReaderError>>
pub fn get_volume(&self, name: &str) -> Result<VolumeSection, OwnedReaderError>
Trait Implementations§
source§impl Clone for OwnedReader
impl Clone for OwnedReader
source§fn clone(&self) -> OwnedReader
fn clone(&self) -> OwnedReader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OwnedReader
impl Debug for OwnedReader
source§impl From<OwnedReader> for Container
impl From<OwnedReader> for Container
source§fn from(value: OwnedReader) -> Self
fn from(value: OwnedReader) -> Self
Converts to this type from the input type.
source§impl PartialEq<OwnedReader> for OwnedReader
impl PartialEq<OwnedReader> for OwnedReader
source§fn eq(&self, other: &OwnedReader) -> bool
fn eq(&self, other: &OwnedReader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.