#[non_exhaustive]pub struct GcRule {
pub rule: Option<Rule>,
/* private fields */
}Expand description
Rule for determining which cells to delete during garbage collection.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rule: Option<Rule>Garbage collection rules.
Implementations§
Source§impl GcRule
impl GcRule
pub fn new() -> Self
Sourcepub fn max_num_versions(&self) -> Option<&i32>
pub fn max_num_versions(&self) -> Option<&i32>
The value of rule
if it holds a MaxNumVersions, None if the field is not set or
holds a different branch.
Sourcepub fn set_max_num_versions<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_num_versions<T: Into<i32>>(self, v: T) -> Self
Sets the value of rule
to hold a MaxNumVersions.
Note that all the setters affecting rule are
mutually exclusive.
§Example
let x = GcRule::new().set_max_num_versions(42);
assert!(x.max_num_versions().is_some());
assert!(x.max_age().is_none());
assert!(x.intersection().is_none());
assert!(x.union().is_none());Sourcepub fn max_age(&self) -> Option<&Box<Duration>>
pub fn max_age(&self) -> Option<&Box<Duration>>
The value of rule
if it holds a MaxAge, None if the field is not set or
holds a different branch.
Sourcepub fn set_max_age<T: Into<Box<Duration>>>(self, v: T) -> Self
pub fn set_max_age<T: Into<Box<Duration>>>(self, v: T) -> Self
Sets the value of rule
to hold a MaxAge.
Note that all the setters affecting rule are
mutually exclusive.
§Example
use wkt::Duration;
let x = GcRule::new().set_max_age(Duration::default()/* use setters */);
assert!(x.max_age().is_some());
assert!(x.max_num_versions().is_none());
assert!(x.intersection().is_none());
assert!(x.union().is_none());Sourcepub fn intersection(&self) -> Option<&Box<Intersection>>
pub fn intersection(&self) -> Option<&Box<Intersection>>
The value of rule
if it holds a Intersection, None if the field is not set or
holds a different branch.
Sourcepub fn set_intersection<T: Into<Box<Intersection>>>(self, v: T) -> Self
pub fn set_intersection<T: Into<Box<Intersection>>>(self, v: T) -> Self
Sets the value of rule
to hold a Intersection.
Note that all the setters affecting rule are
mutually exclusive.
§Example
use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
let x = GcRule::new().set_intersection(Intersection::default()/* use setters */);
assert!(x.intersection().is_some());
assert!(x.max_num_versions().is_none());
assert!(x.max_age().is_none());
assert!(x.union().is_none());Sourcepub fn union(&self) -> Option<&Box<Union>>
pub fn union(&self) -> Option<&Box<Union>>
The value of rule
if it holds a Union, None if the field is not set or
holds a different branch.
Sourcepub fn set_union<T: Into<Box<Union>>>(self, v: T) -> Self
pub fn set_union<T: Into<Box<Union>>>(self, v: T) -> Self
Sets the value of rule
to hold a Union.
Note that all the setters affecting rule are
mutually exclusive.
§Example
use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
let x = GcRule::new().set_union(Union::default()/* use setters */);
assert!(x.union().is_some());
assert!(x.max_num_versions().is_none());
assert!(x.max_age().is_none());
assert!(x.intersection().is_none());