#[non_exhaustive]pub struct PersistenceConfig {
pub persistence_mode: PersistenceMode,
pub rdb_snapshot_period: SnapshotPeriod,
pub rdb_next_snapshot_time: Option<Timestamp>,
pub rdb_snapshot_start_time: Option<Timestamp>,
/* private fields */
}Expand description
Configuration of the persistence functionality.
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.persistence_mode: PersistenceModeOptional. Controls whether Persistence features are enabled. If not provided, the existing value will be used.
rdb_snapshot_period: SnapshotPeriodOptional. Period between RDB snapshots. Snapshots will be attempted every period starting from the provided snapshot start time. For example, a start time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45, 18:45, and 00:45 the next day, and so on. If not provided, TWENTY_FOUR_HOURS will be used as default.
rdb_next_snapshot_time: Option<Timestamp>Output only. The next time that a snapshot attempt is scheduled to occur.
rdb_snapshot_start_time: Option<Timestamp>Optional. Date and time that the first snapshot was/will be attempted, and to which future snapshots will be aligned. If not provided, the current time will be used.
Implementations§
Source§impl PersistenceConfig
impl PersistenceConfig
pub fn new() -> Self
Sourcepub fn set_persistence_mode<T: Into<PersistenceMode>>(self, v: T) -> Self
pub fn set_persistence_mode<T: Into<PersistenceMode>>(self, v: T) -> Self
Sets the value of persistence_mode.
Sourcepub fn set_rdb_snapshot_period<T: Into<SnapshotPeriod>>(self, v: T) -> Self
pub fn set_rdb_snapshot_period<T: Into<SnapshotPeriod>>(self, v: T) -> Self
Sets the value of rdb_snapshot_period.
Sourcepub fn set_rdb_next_snapshot_time<T>(self, v: T) -> Self
pub fn set_rdb_next_snapshot_time<T>(self, v: T) -> Self
Sets the value of rdb_next_snapshot_time.
Sourcepub fn set_or_clear_rdb_next_snapshot_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_rdb_next_snapshot_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of rdb_next_snapshot_time.
Sourcepub fn set_rdb_snapshot_start_time<T>(self, v: T) -> Self
pub fn set_rdb_snapshot_start_time<T>(self, v: T) -> Self
Sets the value of rdb_snapshot_start_time.
Sourcepub fn set_or_clear_rdb_snapshot_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_rdb_snapshot_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of rdb_snapshot_start_time.
Trait Implementations§
Source§impl Clone for PersistenceConfig
impl Clone for PersistenceConfig
Source§fn clone(&self) -> PersistenceConfig
fn clone(&self) -> PersistenceConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more