#[non_exhaustive]pub struct LocalSourceSaveOptions {
pub set_atime: Option<TimeOption>,
pub set_ctime: Option<TimeOption>,
pub set_devid: Option<DevIdOption>,
pub set_blockdev: Option<BlockdevOption>,
pub set_xattrs: Option<XattrOption>,
}Expand description
LocalSourceSaveOptions describes how entries from a local source will be saved in the repository.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.set_atime: Option<TimeOption>Set access time [default: mtime]
set_ctime: Option<TimeOption>Set changed time [default: yes]
set_devid: Option<DevIdOption>Set device ID [default: hardlink]
set_blockdev: Option<BlockdevOption>How block devices should be stored [default: special]
set_xattrs: Option<XattrOption>Set extended attributes [default: yes]
Implementations§
Source§impl LocalSourceSaveOptions
impl LocalSourceSaveOptions
Sourcepub fn set_atime(self, value: impl Into<Option<TimeOption>>) -> Self
pub fn set_atime(self, value: impl Into<Option<TimeOption>>) -> Self
Sets the set_atime field of this struct.
Sourcepub fn set_ctime(self, value: impl Into<Option<TimeOption>>) -> Self
pub fn set_ctime(self, value: impl Into<Option<TimeOption>>) -> Self
Sets the set_ctime field of this struct.
Sourcepub fn set_devid(self, value: impl Into<Option<DevIdOption>>) -> Self
pub fn set_devid(self, value: impl Into<Option<DevIdOption>>) -> Self
Sets the set_devid field of this struct.
Sourcepub fn set_blockdev(self, value: impl Into<Option<BlockdevOption>>) -> Self
pub fn set_blockdev(self, value: impl Into<Option<BlockdevOption>>) -> Self
Sets the set_blockdev field of this struct.
Sourcepub fn set_xattrs(self, value: impl Into<Option<XattrOption>>) -> Self
pub fn set_xattrs(self, value: impl Into<Option<XattrOption>>) -> Self
Sets the set_xattrs field of this struct.
Source§impl LocalSourceSaveOptions
impl LocalSourceSaveOptions
Sourcepub fn map_entry(
self,
entry: DirEntry,
) -> Result<ReadSourceEntry<OpenFile>, IgnoreErrorKind>
pub fn map_entry( self, entry: DirEntry, ) -> Result<ReadSourceEntry<OpenFile>, IgnoreErrorKind>
Maps a DirEntry to a ReadSourceEntry.
§Arguments
entry- TheDirEntryto map.options- options for saving entries
§Errors
- If metadata could not be read.
- If the xattr of the entry could not be read.
fn to_node( self, entry: &DirEntry, m: &Metadata, meta: Metadata, ) -> Result<Node, IgnoreErrorKind>
Source§impl LocalSourceSaveOptions
impl LocalSourceSaveOptions
fn ctime(m: &Metadata) -> Option<Timestamp>
fn device_id(m: &Metadata) -> u64
fn hardlink(m: &Metadata) -> bool
fn user_group( m: &Metadata, ) -> (Option<u32>, Option<String>, Option<u32>, Option<String>)
fn nix_infos(m: &Metadata) -> (Option<u32>, u64, u64)
Sourcefn xattrs(path: &Path) -> Result<Vec<ExtendedAttribute>, IgnoreErrorKind>
fn xattrs(path: &Path) -> Result<Vec<ExtendedAttribute>, IgnoreErrorKind>
List ExtendedAttribute for a Node located at path
§Argument
pathto theNodefor which to list attributes
§Errors
- If Xattr couldn’t be listed or couldn’t be read
fn to_node_other(self, name: &OsStr, m: &Metadata, meta: Metadata) -> Node
Trait Implementations§
Source§impl Args for LocalSourceSaveOptions
impl Args for LocalSourceSaveOptions
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Clone for LocalSourceSaveOptions
impl Clone for LocalSourceSaveOptions
Source§fn clone(&self) -> LocalSourceSaveOptions
fn clone(&self) -> LocalSourceSaveOptions
Returns a duplicate 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 LocalSourceSaveOptions
impl Debug for LocalSourceSaveOptions
Source§impl Default for LocalSourceSaveOptions
impl Default for LocalSourceSaveOptions
Source§fn default() -> LocalSourceSaveOptions
fn default() -> LocalSourceSaveOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LocalSourceSaveOptionswhere
LocalSourceSaveOptions: Default,
impl<'de> Deserialize<'de> for LocalSourceSaveOptionswhere
LocalSourceSaveOptions: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromArgMatches for LocalSourceSaveOptions
impl FromArgMatches for LocalSourceSaveOptions
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Merge for LocalSourceSaveOptions
impl Merge for LocalSourceSaveOptions
Source§impl Parser for LocalSourceSaveOptions
impl Parser for LocalSourceSaveOptions
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Source§impl Serialize for LocalSourceSaveOptions
impl Serialize for LocalSourceSaveOptions
impl Copy for LocalSourceSaveOptions
Auto Trait Implementations§
impl Freeze for LocalSourceSaveOptions
impl RefUnwindSafe for LocalSourceSaveOptions
impl Send for LocalSourceSaveOptions
impl Sync for LocalSourceSaveOptions
impl Unpin for LocalSourceSaveOptions
impl UnwindSafe for LocalSourceSaveOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> MergeFrom for Twhere
T: Merge,
impl<T> MergeFrom for Twhere
T: Merge,
Source§fn merge_from(self, other: Self) -> Selfwhere
Self: Sized,
fn merge_from(self, other: Self) -> Selfwhere
Self: Sized,
Merges two instances of a type into a new instance. Read more