pub struct ZipIdentifier<T: ContentType> { /* private fields */ }Expand description
A ContentIdentifier for ZIP archives.
Fast identification is the local-file magic PK\x03\x04.
validate then looks for an End of
Central Directory record in the tail of the content, so a file
that merely starts with those four bytes is rejected. Identification
is by content, not by .zip extension.
ⓘ
let mut scanner = ScannerBuilder::<MyTypes>::new()
.add_identifier(MyTypes::Zip, ZipIdentifier::new())
.build();Implementations§
Source§impl<T: ContentType> ZipIdentifier<T>
impl<T: ContentType> ZipIdentifier<T>
Trait Implementations§
Source§impl<T: ContentType> ContentIdentifier<T> for ZipIdentifier<T>
impl<T: ContentType> ContentIdentifier<T> for ZipIdentifier<T>
Source§impl<T: ContentType> Default for ZipIdentifier<T>
impl<T: ContentType> Default for ZipIdentifier<T>
Auto Trait Implementations§
impl<T> Freeze for ZipIdentifier<T>where
PhantomData<T>: Freeze,
impl<T> RefUnwindSafe for ZipIdentifier<T>where
PhantomData<T>: RefUnwindSafe,
impl<T> Send for ZipIdentifier<T>where
PhantomData<T>: Send,
impl<T> Sync for ZipIdentifier<T>where
PhantomData<T>: Sync,
impl<T> Unpin for ZipIdentifier<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for ZipIdentifier<T>where
PhantomData<T>: UnsafeUnpin,
impl<T> UnwindSafe for ZipIdentifier<T>where
PhantomData<T>: UnwindSafe,
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