#[non_exhaustive]pub struct ClusterPersistenceConfig {
pub mode: PersistenceMode,
pub rdb_config: Option<RDBConfig>,
pub aof_config: Option<AOFConfig>,
/* private fields */
}Expand description
Configuration of the persistence functionality.
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.mode: PersistenceModeOptional. The mode of persistence.
rdb_config: Option<RDBConfig>Optional. RDB configuration. This field will be ignored if mode is not RDB.
aof_config: Option<AOFConfig>Optional. AOF configuration. This field will be ignored if mode is not AOF.
Implementations§
Source§impl ClusterPersistenceConfig
impl ClusterPersistenceConfig
pub fn new() -> Self
Sourcepub fn set_mode<T: Into<PersistenceMode>>(self, v: T) -> Self
pub fn set_mode<T: Into<PersistenceMode>>(self, v: T) -> Self
Sets the value of mode.
Sourcepub fn set_rdb_config<T>(self, v: T) -> Self
pub fn set_rdb_config<T>(self, v: T) -> Self
Sets the value of rdb_config.
Sourcepub fn set_or_clear_rdb_config<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_rdb_config<T>(self, v: Option<T>) -> Self
Sets or clears the value of rdb_config.
Sourcepub fn set_aof_config<T>(self, v: T) -> Self
pub fn set_aof_config<T>(self, v: T) -> Self
Sets the value of aof_config.
Sourcepub fn set_or_clear_aof_config<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_aof_config<T>(self, v: Option<T>) -> Self
Sets or clears the value of aof_config.
Trait Implementations§
Source§impl Clone for ClusterPersistenceConfig
impl Clone for ClusterPersistenceConfig
Source§fn clone(&self) -> ClusterPersistenceConfig
fn clone(&self) -> ClusterPersistenceConfig
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 ClusterPersistenceConfig
impl Debug for ClusterPersistenceConfig
Source§impl Default for ClusterPersistenceConfig
impl Default for ClusterPersistenceConfig
Source§fn default() -> ClusterPersistenceConfig
fn default() -> ClusterPersistenceConfig
Returns the “default value” for a type. Read more
Source§impl Message for ClusterPersistenceConfig
impl Message for ClusterPersistenceConfig
Source§impl PartialEq for ClusterPersistenceConfig
impl PartialEq for ClusterPersistenceConfig
impl StructuralPartialEq for ClusterPersistenceConfig
Auto Trait Implementations§
impl Freeze for ClusterPersistenceConfig
impl RefUnwindSafe for ClusterPersistenceConfig
impl Send for ClusterPersistenceConfig
impl Sync for ClusterPersistenceConfig
impl Unpin for ClusterPersistenceConfig
impl UnwindSafe for ClusterPersistenceConfig
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