pub struct EntryHandle<'a, F> { /* private fields */ }
Expand description
A zip entry, read synchronously from a file or other I/O resource.
Implementations§
Methods from Deref<Target = Entry>§
sourcepub fn sanitized_name(&self) -> Option<&str>
pub fn sanitized_name(&self) -> Option<&str>
Returns a sanitized version of the entry’s name, if it seems safe. In particular, if this method feels like the entry name is trying to do a zip slip (cf. https://snyk.io/research/zip-slip-vulnerability), it’ll return None.
Other than that, it will strip any leading slashes on non-Windows OSes.
Trait Implementations§
Auto Trait Implementations§
impl<'a, F> Freeze for EntryHandle<'a, F>
impl<'a, F> RefUnwindSafe for EntryHandle<'a, F>where
F: RefUnwindSafe,
impl<'a, F> Send for EntryHandle<'a, F>where
F: Sync,
impl<'a, F> Sync for EntryHandle<'a, F>where
F: Sync,
impl<'a, F> Unpin for EntryHandle<'a, F>
impl<'a, F> UnwindSafe for EntryHandle<'a, F>where
F: RefUnwindSafe,
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