pub struct RecoveryConfig {
pub checkpoint_dir: PathBuf,
pub wal_path: PathBuf,
pub repair_wal: bool,
pub collect_state_changes: bool,
pub max_wal_entries: u64,
}Expand description
Configuration for recovery.
Fields§
§checkpoint_dir: PathBufPath to checkpoint directory.
wal_path: PathBufPath to WAL file.
repair_wal: boolWhether to repair torn writes in WAL.
collect_state_changes: boolWhether to collect state changes for incremental application.
max_wal_entries: u64Maximum WAL entries to replay (0 = unlimited).
Implementations§
Source§impl RecoveryConfig
impl RecoveryConfig
Sourcepub fn new(checkpoint_dir: &Path, wal_path: &Path) -> Self
pub fn new(checkpoint_dir: &Path, wal_path: &Path) -> Self
Creates a new recovery configuration.
Sourcepub fn with_repair_wal(self, enabled: bool) -> Self
pub fn with_repair_wal(self, enabled: bool) -> Self
Enables WAL repair on recovery.
Sourcepub fn with_collect_state_changes(self, enabled: bool) -> Self
pub fn with_collect_state_changes(self, enabled: bool) -> Self
Enables collection of state changes.
Sourcepub fn with_max_wal_entries(self, max: u64) -> Self
pub fn with_max_wal_entries(self, max: u64) -> Self
Sets maximum WAL entries to replay.
Trait Implementations§
Source§impl Clone for RecoveryConfig
impl Clone for RecoveryConfig
Source§fn clone(&self) -> RecoveryConfig
fn clone(&self) -> RecoveryConfig
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 moreAuto Trait Implementations§
impl Freeze for RecoveryConfig
impl RefUnwindSafe for RecoveryConfig
impl Send for RecoveryConfig
impl Sync for RecoveryConfig
impl Unpin for RecoveryConfig
impl UnsafeUnpin for RecoveryConfig
impl UnwindSafe for RecoveryConfig
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.