pub struct EntryPath<'a>(/* private fields */);Expand description
Controls how an entry path is written to the ZIP file name field.
ZIP calls this header field the “file name”, but the value may include a
relative path such as dir/file.txt.
EntryPath::conformantnormalizes UTF-8 text and sets theEntryFlags::is_utf8flag when needed.EntryPath::verbatimwrites uninterpreted bytes without that flag.
§Examples
use rawzip::path::EntryPath;
// A UTF-8 path, normalized on write.
let path = EntryPath::conformant("docs/readme.txt");
// Exact bytes, no normalization, no UTF-8 flag.
let path = EntryPath::verbatim(b"odd\x05name");Implementations§
Trait Implementations§
impl<'a> Eq for EntryPath<'a>
Source§impl<'a> From<ZipFilePath<NormalizedPath<'a>>> for EntryPath<'a>
Available on crate feature alloc only.
impl<'a> From<ZipFilePath<NormalizedPath<'a>>> for EntryPath<'a>
Available on crate feature
alloc only.Source§fn from(value: ZipFilePath<NormalizedPath<'a>>) -> Self
fn from(value: ZipFilePath<NormalizedPath<'a>>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<ZipFilePath<NormalizedPathBuf>> for EntryPath<'a>
Available on crate feature alloc only.
impl<'a> From<ZipFilePath<NormalizedPathBuf>> for EntryPath<'a>
Available on crate feature
alloc only.Source§fn from(value: ZipFilePath<NormalizedPathBuf>) -> Self
fn from(value: ZipFilePath<NormalizedPathBuf>) -> Self
Converts to this type from the input type.
impl<'a> StructuralPartialEq for EntryPath<'a>
Auto Trait Implementations§
impl<'a> Freeze for EntryPath<'a>
impl<'a> RefUnwindSafe for EntryPath<'a>
impl<'a> Send for EntryPath<'a>
impl<'a> Sync for EntryPath<'a>
impl<'a> Unpin for EntryPath<'a>
impl<'a> UnsafeUnpin for EntryPath<'a>
impl<'a> UnwindSafe for EntryPath<'a>
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