pub struct SnapshotFilter {Show 13 fields
filter_hosts: Vec<String>,
filter_labels: Vec<String>,
filter_paths: Vec<StringList>,
filter_paths_exact: Vec<StringList>,
filter_tags: Vec<StringList>,
filter_tags_exact: Vec<StringList>,
filter_after: Option<AfterDate>,
filter_before: Option<BeforeDate>,
filter_size: Option<SizeRange>,
filter_size_added: Option<SizeRange>,
filter_last: Option<usize>,
filter_fn: Option<String>,
filter_jq: Option<String>,
}Fields§
§filter_hosts: Vec<String>Hostname to filter (can be specified multiple times)
filter_labels: Vec<String>Label to filter (can be specified multiple times)
filter_paths: Vec<StringList>Path list to filter (can be specified multiple times)
filter_paths_exact: Vec<StringList>Path list to filter exactly (no superset) as given (can be specified multiple times)
Tag list to filter (can be specified multiple times)
Tag list to filter exactly (no superset) as given (can be specified multiple times)
filter_after: Option<AfterDate>Only use snapshots which are taken after the given given date/time
filter_before: Option<BeforeDate>Only use snapshots which are taken before the given given date/time
filter_size: Option<SizeRange>Only use snapshots with total size in given range
filter_size_added: Option<SizeRange>Only use snapshots with size added to the repo in given range
filter_last: Option<usize>Only use the last COUNT snapshots for each group
filter_fn: Option<String>Function to filter snapshots
filter_jq: Option<String>jq to filter snapshots
Implementations§
Source§impl SnapshotFilter
impl SnapshotFilter
Sourcepub fn matches(&self, snapshot: &SnapshotFile) -> bool
pub fn matches(&self, snapshot: &SnapshotFile) -> bool
Check if a SnapshotFile matches the filter
§Arguments
snapshot- The snapshot to check
§Returns
true if the snapshot matches the filter, false otherwise
pub fn post_process(&self, snapshots: &mut Vec<SnapshotFile>)
Trait Implementations§
Source§impl Args for SnapshotFilter
impl Args for SnapshotFilter
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 SnapshotFilter
impl Clone for SnapshotFilter
Source§fn clone(&self) -> SnapshotFilter
fn clone(&self) -> SnapshotFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CommandFactory for SnapshotFilter
impl CommandFactory for SnapshotFilter
Source§impl Debug for SnapshotFilter
impl Debug for SnapshotFilter
Source§impl Default for SnapshotFilter
impl Default for SnapshotFilter
Source§fn default() -> SnapshotFilter
fn default() -> SnapshotFilter
Source§impl<'de> Deserialize<'de> for SnapshotFilterwhere
SnapshotFilter: Default,
impl<'de> Deserialize<'de> for SnapshotFilterwhere
SnapshotFilter: 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 SnapshotFilter
impl FromArgMatches for SnapshotFilter
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 SnapshotFilter
impl Merge for SnapshotFilter
Source§impl Parser for SnapshotFilter
impl Parser for SnapshotFilter
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 SnapshotFilter
impl RefUnwindSafe for SnapshotFilter
impl Send for SnapshotFilter
impl Sync for SnapshotFilter
impl Unpin for SnapshotFilter
impl UnwindSafe for SnapshotFilter
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