Struct async_mtzip::extra_field::ExtraFields
source · pub struct ExtraFields { /* private fields */ }Expand description
This is a structure containing ExtraFields associated with a file or directory in a zip
file, mostly used for filesystem properties, and this is the only functionality implemented
here.
The new_from_fs method will use the metadata the filesystem provides to
construct the collection.
Implementations§
source§impl ExtraFields
impl ExtraFields
sourcepub unsafe fn new<I>(fields: I) -> Selfwhere
I: IntoIterator<Item = ExtraField>,
pub unsafe fn new<I>(fields: I) -> Selfwhere
I: IntoIterator<Item = ExtraField>,
Create a new set of ExtraFields. Self::new_from_fs should be preferred.
§Safety
All fields must have valid values depending on the field type.
sourcepub fn new_from_fs(metadata: &Metadata) -> Self
pub fn new_from_fs(metadata: &Metadata) -> Self
This method will use the filesystem metadata to get the properties that can be stored in
ZIP ExtraFields.
The behavior is dependent on the target platform. Will return an empty set if the target os is not Windows or Linux and not of UNIX family.
Trait Implementations§
source§impl Clone for ExtraFields
impl Clone for ExtraFields
source§fn clone(&self) -> ExtraFields
fn clone(&self) -> ExtraFields
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ExtraFields
impl Debug for ExtraFields
source§impl Default for ExtraFields
impl Default for ExtraFields
source§fn default() -> ExtraFields
fn default() -> ExtraFields
Returns the “default value” for a type. Read more
source§impl PartialEq for ExtraFields
impl PartialEq for ExtraFields
source§fn eq(&self, other: &ExtraFields) -> bool
fn eq(&self, other: &ExtraFields) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for ExtraFields
impl StructuralPartialEq for ExtraFields
Auto Trait Implementations§
impl Freeze for ExtraFields
impl RefUnwindSafe for ExtraFields
impl Send for ExtraFields
impl Sync for ExtraFields
impl Unpin for ExtraFields
impl UnwindSafe for ExtraFields
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more