Struct archive_reader::Entry
source · pub struct Entry { /* private fields */ }Expand description
Entry represents a file / dir in an archive.
Safety
Try not to keep entry objects! Entry has pointers pointing to the bytes in the archive. Every call on Entries::next will disable the pointers, and it is undefined behaviour to use the functions while the Entry is not pointing to the newest entry.
Implementations§
source§impl Entry
impl Entry
sourcepub fn file_name<F>(&self, decode: F) -> Result<Cow<'_, str>>where
F: FnOnce(&[u8]) -> Option<Cow<'_, str>>,
pub fn file_name<F>(&self, decode: F) -> Result<Cow<'_, str>>where F: FnOnce(&[u8]) -> Option<Cow<'_, str>>,
file_name returns the name of the entry decoded with the provided decoder.
It may fail if the decoder cannot decode the name.