Struct pkgar::PackageFile
source · pub struct PackageFile { /* private fields */ }
Implementations§
Trait Implementations§
source§impl Debug for PackageFile
impl Debug for PackageFile
source§impl PackageSrc for PackageFile
impl PackageSrc for PackageFile
type Err = Error
fn header(&self) -> Header
fn read_at(&mut self, offset: u64, buf: &mut [u8]) -> Result<usize, Self::Err>
source§fn read_header(&mut self, public_key: &PublicKey) -> Result<Header, Self::Err>
fn read_header(&mut self, public_key: &PublicKey) -> Result<Header, Self::Err>
Users of implementors of
PackageSrc
should use header
instead of read_header
for
cheap header access.
Implementors of PackageSrc
should call this function during initialization and store
the result to pass out with header
.fn read_entries(&mut self) -> Result<Vec<Entry, Global>, Self::Err>
source§impl PackageSrcExt for PackageFile
impl PackageSrcExt for PackageFile
source§fn path(&self) -> &Path
fn path(&self) -> &Path
Get the path corresponding to this
PackageSrc
. This will likely be
refactored to use something more generic than Path
in future.source§fn entry_reader(&mut self, entry: Entry) -> EntryReader<'_, Self> ⓘ
fn entry_reader(&mut self, entry: Entry) -> EntryReader<'_, Self> ⓘ
Build a reader for a given entry on this source.