Struct pkgar::PackageFile
source · [−]pub struct PackageFile { /* private fields */ }
Implementations
sourceimpl PackageFile
impl PackageFile
Trait Implementations
sourceimpl Debug for PackageFile
impl Debug for PackageFile
sourceimpl 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>
sourcefn 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
. Read more
fn read_entries(&mut self) -> Result<Vec<Entry, Global>, Self::Err>
sourceimpl PackageSrcExt for PackageFile
impl PackageSrcExt for PackageFile
sourcefn 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. Read more
sourcefn entry_reader(&mut self, entry: Entry) -> EntryReader<'_, Self>ⓘNotable traits for EntryReader<'_, Src>impl<Src, E> Read for EntryReader<'_, Src> where
Src: PackageSrc<Err = E>,
E: From<Error> + Error,
fn entry_reader(&mut self, entry: Entry) -> EntryReader<'_, Self>ⓘNotable traits for EntryReader<'_, Src>impl<Src, E> Read for EntryReader<'_, Src> where
Src: PackageSrc<Err = E>,
E: From<Error> + Error,
Src: PackageSrc<Err = E>,
E: From<Error> + Error,
Build a reader for a given entry on this source.
Auto Trait Implementations
impl RefUnwindSafe for PackageFile
impl Send for PackageFile
impl Sync for PackageFile
impl Unpin for PackageFile
impl UnwindSafe for PackageFile
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more