pub struct RusticConfig {
pub global: GlobalOptions,
pub repository: AllRepositoryOptions,
pub snapshot_filter: SnapshotFilter,
pub backup: BackupCmd,
pub copy: CopyCmd,
pub forget: ForgetOptions,
pub mount: MountCmd,
pub webdav: WebDavCmd,
}Expand description
Fields§
§global: GlobalOptionsGlobal options
repository: AllRepositoryOptionsRepository options
snapshot_filter: SnapshotFilterSnapshot filter options
backup: BackupCmdBackup options
copy: CopyCmdCopy options
forget: ForgetOptionsForget options
mount: MountCmdmount options
webdav: WebDavCmdwebdav options
Implementations§
Source§impl RusticConfig
impl RusticConfig
Sourcepub fn merge_profile(
&mut self,
profile: &str,
merge_logs: &mut Vec<(Level, String)>,
level_missing: Level,
) -> Result<(), FrameworkError>
pub fn merge_profile( &mut self, profile: &str, merge_logs: &mut Vec<(Level, String)>, level_missing: Level, ) -> Result<(), FrameworkError>
Merge a profile into the current config by reading the corresponding config file. Also recursively merge all profiles given within this config file.
§Arguments
profile- name of the profile to mergemerge_logs- Vector to collect logs during merginglevel_missing- The log level to use if this profile is missing. Recursive calls will produce a Warning.
Trait Implementations§
Source§impl Args for RusticConfig
impl Args for RusticConfig
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 RusticConfig
impl Clone for RusticConfig
Source§fn clone(&self) -> RusticConfig
fn clone(&self) -> RusticConfig
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 CommandFactory for RusticConfig
impl CommandFactory for RusticConfig
Source§impl Configurable<RusticConfig> for EntryPoint
This trait allows you to define how application configuration is loaded.
impl Configurable<RusticConfig> for EntryPoint
This trait allows you to define how application configuration is loaded.
Source§fn config_path(&self) -> Option<PathBuf>
fn config_path(&self) -> Option<PathBuf>
Location of the configuration file
Source§fn process_config(
&self,
_config: RusticConfig,
) -> Result<RusticConfig, FrameworkError>
fn process_config( &self, _config: RusticConfig, ) -> Result<RusticConfig, FrameworkError>
Apply changes to the config after it’s been loaded, e.g. overriding values in a config file using command-line options.
Source§impl Debug for RusticConfig
impl Debug for RusticConfig
Source§impl Default for RusticConfig
impl Default for RusticConfig
Source§fn default() -> RusticConfig
fn default() -> RusticConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RusticConfigwhere
RusticConfig: Default,
impl<'de> Deserialize<'de> for RusticConfigwhere
RusticConfig: 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 Display for RusticConfig
impl Display for RusticConfig
Source§impl FromArgMatches for RusticConfig
impl FromArgMatches for RusticConfig
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 RusticConfig
impl Merge for RusticConfig
Source§impl Override<RusticConfig> for CopyCmd
impl Override<RusticConfig> for CopyCmd
Source§fn override_config(
&self,
config: RusticConfig,
) -> Result<RusticConfig, FrameworkError>
fn override_config( &self, config: RusticConfig, ) -> Result<RusticConfig, FrameworkError>
Process the given command line options, overriding settings from
a configuration file using explicit flags taken from command-line
arguments. Read more
Source§impl Override<RusticConfig> for ForgetCmd
impl Override<RusticConfig> for ForgetCmd
Source§fn override_config(
&self,
config: RusticConfig,
) -> Result<RusticConfig, FrameworkError>
fn override_config( &self, config: RusticConfig, ) -> Result<RusticConfig, FrameworkError>
Process the given command line options, overriding settings from
a configuration file using explicit flags taken from command-line
arguments. Read more
Source§impl Override<RusticConfig> for MountCmd
impl Override<RusticConfig> for MountCmd
Source§fn override_config(
&self,
config: RusticConfig,
) -> Result<RusticConfig, FrameworkError>
fn override_config( &self, config: RusticConfig, ) -> Result<RusticConfig, FrameworkError>
Process the given command line options, overriding settings from
a configuration file using explicit flags taken from command-line
arguments. Read more
Source§impl Override<RusticConfig> for WebDavCmd
impl Override<RusticConfig> for WebDavCmd
Source§fn override_config(
&self,
config: RusticConfig,
) -> Result<RusticConfig, FrameworkError>
fn override_config( &self, config: RusticConfig, ) -> Result<RusticConfig, FrameworkError>
Process the given command line options, overriding settings from
a configuration file using explicit flags taken from command-line
arguments. Read more
Source§impl Parser for RusticConfig
impl Parser for RusticConfig
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)
Auto Trait Implementations§
impl Freeze for RusticConfig
impl RefUnwindSafe for RusticConfig
impl Send for RusticConfig
impl Sync for RusticConfig
impl Unpin for RusticConfig
impl UnsafeUnpin for RusticConfig
impl UnwindSafe for RusticConfig
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<C> Config for C
impl<C> Config for C
Source§fn load_toml(toml_string: impl AsRef<str>) -> Result<C, FrameworkError>
fn load_toml(toml_string: impl AsRef<str>) -> Result<C, FrameworkError>
Load the configuration from the given TOML string.
Source§fn load_toml_file(path: impl AsRef<CanonicalPath>) -> Result<C, FrameworkError>
fn load_toml_file(path: impl AsRef<CanonicalPath>) -> Result<C, FrameworkError>
Load the global configuration from the TOML file at the given path.
If an error occurs reading or parsing the file, print it out and exit.
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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
Source§impl<T> MergePrecedence for Twhere
T: MergeFrom,
impl<T> MergePrecedence for Twhere
T: MergeFrom,
Source§fn merge_precedence(self, medium: Self, low: Self) -> Selfwhere
Self: Sized,
fn merge_precedence(self, medium: Self, low: Self) -> Selfwhere
Self: Sized,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.