Struct nuts_archive::Entry
source · pub struct Entry<'a, B: Backend> { /* private fields */ }Expand description
An entry of the archive.
An instance of Entry represents an entry of the archive.
You can traverse through the archive using the Entry::next() method.
The first entry of the archive is returned by
Archive::first().
Implementations§
source§impl<'a, B: Backend> Entry<'a, B>
impl<'a, B: Backend> Entry<'a, B>
sourcepub fn next(self) -> Option<ArchiveResult<Entry<'a, B>, B>>
pub fn next(self) -> Option<ArchiveResult<Entry<'a, B>, B>>
Returns the next entry in the archive.
If this is the last entry None is returned, which means that there
are no further entries available.
sourcepub fn read(&mut self, buf: &mut [u8]) -> ArchiveResult<usize, B>
pub fn read(&mut self, buf: &mut [u8]) -> ArchiveResult<usize, B>
sourcepub fn read_all(&mut self, buf: &mut [u8]) -> ArchiveResult<(), B>
pub fn read_all(&mut self, buf: &mut [u8]) -> ArchiveResult<(), B>
Read the exact number of bytes required to fill buf
This function reads as many bytes as necessary to completely fill the
specified buffer buf.
Errors
If this function encounters an “end of file” before completely filling
the buffer, it returns an Error::UnexpectedEof error. The contents
of buf are unspecified in this case.
Auto Trait Implementations§
impl<'a, B> !RefUnwindSafe for Entry<'a, B>
impl<'a, B> !Send for Entry<'a, B>
impl<'a, B> !Sync for Entry<'a, B>
impl<'a, B> Unpin for Entry<'a, B>
impl<'a, B> !UnwindSafe for Entry<'a, B>
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