#[non_exhaustive]pub struct RapidCache {
pub name: String,
pub zone: String,
pub cache_type: String,
pub ttl: Option<Duration>,
pub admission_policy: String,
pub state: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub pending_update: bool,
/* private fields */
}Expand description
A Rapid Cache Instance.
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.name: StringImmutable. The resource name of this RapidCache. Format: projects/{project}/buckets/{bucket}/rapidCaches/{rapid_cache}
zone: StringImmutable. The zone in which the cache instance is running. For example, us-central1-a.
cache_type: StringImmutable. The type of Rapid Cache this represents. Valid values include: ‘rapid-cache’ and ‘rapid-cache-ultra’.
ttl: Option<Duration>Cache entry TTL (ranges between 1h to 7d). This is a cache-level config that defines how long a cache entry can live. Default ttl value (24hrs) is applied if not specified in the create request. TTL must be in whole seconds.
admission_policy: StringCache admission policy. Valid policies includes: no_read_admission, admit-on-first-miss and admit-on-second-miss. Defaults to admit-on-first-miss for both AC and RCU. Default value is applied if not specified in the create request.
state: StringOutput only. Cache state including running, creating, and disabled.
create_time: Option<Timestamp>Output only. Time when Rapid cache instance is allocated.
update_time: Option<Timestamp>Output only. Time when Rapid cache instance is last updated, including creation.
pending_update: boolOutput only. True if there is an active update operation against this cache instance. Subsequential update requests will be rejected if this field is true. Output only.
Implementations§
Source§impl RapidCache
impl RapidCache
Sourcepub fn set_cache_type<T: Into<String>>(self, v: T) -> Self
pub fn set_cache_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_or_clear_ttl<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ttl<T>(self, v: Option<T>) -> Self
Sourcepub fn set_admission_policy<T: Into<String>>(self, v: T) -> Self
pub fn set_admission_policy<T: Into<String>>(self, v: T) -> Self
Sets the value of admission_policy.
§Example
let x = RapidCache::new().set_admission_policy("example");Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = RapidCache::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = RapidCache::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = RapidCache::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = RapidCache::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = RapidCache::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = RapidCache::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_pending_update<T: Into<bool>>(self, v: T) -> Self
pub fn set_pending_update<T: Into<bool>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for RapidCache
impl Clone for RapidCache
Source§fn clone(&self) -> RapidCache
fn clone(&self) -> RapidCache
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RapidCache
impl Debug for RapidCache
Source§impl Default for RapidCache
impl Default for RapidCache
Source§fn default() -> RapidCache
fn default() -> RapidCache
Source§impl PartialEq for RapidCache
impl PartialEq for RapidCache
impl StructuralPartialEq for RapidCache
Auto Trait Implementations§
impl Freeze for RapidCache
impl RefUnwindSafe for RapidCache
impl Send for RapidCache
impl Sync for RapidCache
impl Unpin for RapidCache
impl UnsafeUnpin for RapidCache
impl UnwindSafe for RapidCache
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