pub struct GlobalOptions {Show 14 fields
pub use_profiles: Vec<String>,
pub group_by: Option<SnapshotGroupCriterion>,
pub dry_run: bool,
pub check_index: bool,
pub log_level: Option<String>,
pub log_file: Option<PathBuf>,
pub progress_options: ProgressOptions,
pub hooks: Hooks,
pub env: BTreeMap<String, String>,
pub prometheus: Option<Url>,
pub prometheus_user: Option<String>,
pub prometheus_pass: Option<String>,
pub metrics_labels: BTreeMap<String, String>,
pub opentelemetry: Option<Url>,
}Expand description
Global options
These options are available for all commands.
Fields§
§use_profiles: Vec<String>Config profile to use. This parses the file <PROFILE>.toml in the config directory.
[default: “rustic”]
group_by: Option<SnapshotGroupCriterion>Group snapshots by any combination of host,label,paths,tags, e.g. to find the latest snapshot [default: “host,label,paths”]
dry_run: boolOnly show what would be done without modifying anything. Does not affect read-only commands.
check_index: boolCheck if index matches pack files and read pack headers if necessary
log_level: Option<String>Use this log level [default: info]
log_file: Option<PathBuf>Write log messages to the given file instead of printing them.
§Note
Warnings and errors are still additionally printed unless they are ignored by --log-level
progress_options: ProgressOptionsSettings to customize progress bars
hooks: HooksHooks
env: BTreeMap<String, String>List of environment variables to set (only in config file)
prometheus: Option<Url>Push metrics to a Prometheus Pushgateway
prometheus_user: Option<String>Authenticate to Prometheus Pushgateway using this user
prometheus_pass: Option<String>Authenticate to Prometheus Pushgateway using this password
metrics_labels: BTreeMap<String, String>Additional labels to set to generated metrics
opentelemetry: Option<Url>OpenTelemetry metrics endpoint (HTTP Protobuf)
Implementations§
Source§impl GlobalOptions
impl GlobalOptions
pub fn is_metrics_configured(&self) -> bool
Trait Implementations§
Source§impl Args for GlobalOptions
impl Args for GlobalOptions
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
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Clone for GlobalOptions
impl Clone for GlobalOptions
Source§fn clone(&self) -> GlobalOptions
fn clone(&self) -> GlobalOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CommandFactory for GlobalOptions
impl CommandFactory for GlobalOptions
Source§impl Debug for GlobalOptions
impl Debug for GlobalOptions
Source§impl Default for GlobalOptions
impl Default for GlobalOptions
Source§fn default() -> GlobalOptions
fn default() -> GlobalOptions
Source§impl<'de> Deserialize<'de> for GlobalOptionswhere
GlobalOptions: Default,
impl<'de> Deserialize<'de> for GlobalOptionswhere
GlobalOptions: 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>,
Source§impl FromArgMatches for GlobalOptions
impl FromArgMatches for GlobalOptions
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>
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>
ArgMatches to self.Source§impl Merge for GlobalOptions
impl Merge for GlobalOptions
Source§impl Parser for GlobalOptions
impl Parser for GlobalOptions
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, 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 GlobalOptions
impl RefUnwindSafe for GlobalOptions
impl Send for GlobalOptions
impl Sync for GlobalOptions
impl Unpin for GlobalOptions
impl UnwindSafe for GlobalOptions
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
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>
Source§fn load_toml_file(path: impl AsRef<CanonicalPath>) -> Result<C, FrameworkError>
fn load_toml_file(path: impl AsRef<CanonicalPath>) -> Result<C, FrameworkError>
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>
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>
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