pub struct OwnedReader { /* private fields */ }Available on crate feature
v3 only.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 webc_hash(&self) -> Option<[u8; 32]>
pub fn manifest(&self) -> &Manifest
pub fn index(&self) -> &Index
pub fn atoms_hash(&self) -> [u8; 32]
pub fn atom_names(&self) -> impl Iterator<Item = &str> + '_
pub fn iter_atoms( &self, ) -> impl Iterator<Item = (&str, [u8; 32], &OwnedBuffer)> + '_
pub fn get_atom(&self, name: &str) -> Option<&([u8; 32], 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 duplicate of the value. Read more
1.0.0 (const: unstable) · 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 for OwnedReader
impl PartialEq for OwnedReader
Source§fn eq(&self, other: &OwnedReader) -> bool
fn eq(&self, other: &OwnedReader) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OwnedReader
Auto Trait Implementations§
impl !Freeze for OwnedReader
impl RefUnwindSafe for OwnedReader
impl Send for OwnedReader
impl Sync for OwnedReader
impl Unpin for OwnedReader
impl UnsafeUnpin for OwnedReader
impl UnwindSafe for OwnedReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more