#[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
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());Trait Implementations§
impl StructuralPartialEq for GcRule
Auto Trait Implementations§
impl Freeze for GcRule
impl RefUnwindSafe for GcRule
impl Send for GcRule
impl Sync for GcRule
impl Unpin for GcRule
impl UnsafeUnpin for GcRule
impl UnwindSafe for GcRule
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request