#[non_exhaustive]pub struct CacheConfig {
pub cache_pre_populate: Option<CachePrePopulate>,
pub writeback_enabled: Option<bool>,
pub cifs_change_notify_enabled: Option<bool>,
pub cache_pre_populate_state: CachePrePopulateState,
/* private fields */
}Expand description
Configuration of the cache volume.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cache_pre_populate: Option<CachePrePopulate>Optional. Pre-populate cache volume with data from the origin volume.
writeback_enabled: Option<bool>Optional. Flag indicating whether writeback is enabled for the FlexCache volume.
cifs_change_notify_enabled: Option<bool>Optional. Flag indicating whether a CIFS change notification is enabled for the FlexCache volume.
cache_pre_populate_state: CachePrePopulateStateOutput only. State of the prepopulation job indicating how the prepopulation is progressing.
Implementations§
Source§impl CacheConfig
impl CacheConfig
pub fn new() -> Self
Sourcepub fn set_cache_pre_populate<T>(self, v: T) -> Selfwhere
T: Into<CachePrePopulate>,
pub fn set_cache_pre_populate<T>(self, v: T) -> Selfwhere
T: Into<CachePrePopulate>,
Sets the value of cache_pre_populate.
§Example
ⓘ
use google_cloud_netapp_v1::model::CachePrePopulate;
let x = CacheConfig::new().set_cache_pre_populate(CachePrePopulate::default()/* use setters */);Sourcepub fn set_or_clear_cache_pre_populate<T>(self, v: Option<T>) -> Selfwhere
T: Into<CachePrePopulate>,
pub fn set_or_clear_cache_pre_populate<T>(self, v: Option<T>) -> Selfwhere
T: Into<CachePrePopulate>,
Sets or clears the value of cache_pre_populate.
§Example
ⓘ
use google_cloud_netapp_v1::model::CachePrePopulate;
let x = CacheConfig::new().set_or_clear_cache_pre_populate(Some(CachePrePopulate::default()/* use setters */));
let x = CacheConfig::new().set_or_clear_cache_pre_populate(None::<CachePrePopulate>);Sourcepub fn set_writeback_enabled<T>(self, v: T) -> Self
pub fn set_writeback_enabled<T>(self, v: T) -> Self
Sets the value of writeback_enabled.
§Example
ⓘ
let x = CacheConfig::new().set_writeback_enabled(true);Sourcepub fn set_or_clear_writeback_enabled<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_writeback_enabled<T>(self, v: Option<T>) -> Self
Sets or clears the value of writeback_enabled.
§Example
ⓘ
let x = CacheConfig::new().set_or_clear_writeback_enabled(Some(false));
let x = CacheConfig::new().set_or_clear_writeback_enabled(None::<bool>);Sourcepub fn set_cifs_change_notify_enabled<T>(self, v: T) -> Self
pub fn set_cifs_change_notify_enabled<T>(self, v: T) -> Self
Sets the value of cifs_change_notify_enabled.
§Example
ⓘ
let x = CacheConfig::new().set_cifs_change_notify_enabled(true);Sourcepub fn set_or_clear_cifs_change_notify_enabled<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_cifs_change_notify_enabled<T>(self, v: Option<T>) -> Self
Sets or clears the value of cifs_change_notify_enabled.
§Example
ⓘ
let x = CacheConfig::new().set_or_clear_cifs_change_notify_enabled(Some(false));
let x = CacheConfig::new().set_or_clear_cifs_change_notify_enabled(None::<bool>);Sourcepub fn set_cache_pre_populate_state<T: Into<CachePrePopulateState>>(
self,
v: T,
) -> Self
pub fn set_cache_pre_populate_state<T: Into<CachePrePopulateState>>( self, v: T, ) -> Self
Sets the value of cache_pre_populate_state.
§Example
ⓘ
use google_cloud_netapp_v1::model::cache_config::CachePrePopulateState;
let x0 = CacheConfig::new().set_cache_pre_populate_state(CachePrePopulateState::NotNeeded);
let x1 = CacheConfig::new().set_cache_pre_populate_state(CachePrePopulateState::InProgress);
let x2 = CacheConfig::new().set_cache_pre_populate_state(CachePrePopulateState::Complete);Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§fn clone(&self) -> CacheConfig
fn clone(&self) -> CacheConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CacheConfig
impl Debug for CacheConfig
Source§impl Default for CacheConfig
impl Default for CacheConfig
Source§fn default() -> CacheConfig
fn default() -> CacheConfig
Returns the “default value” for a type. Read more
Source§impl Message for CacheConfig
impl Message for CacheConfig
Source§impl PartialEq for CacheConfig
impl PartialEq for CacheConfig
impl StructuralPartialEq for CacheConfig
Auto Trait Implementations§
impl Freeze for CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnsafeUnpin for CacheConfig
impl UnwindSafe for CacheConfig
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
Mutably borrows from an owned value. Read more