pub struct WriteAheadLogConfig {
pub max_events: u64,
pub capacity_policy: CapacityPolicy,
}Expand description
Per-source configuration supplied to WalProvider::register.
Fields§
§max_events: u64Maximum number of events retained in the WAL before the capacity policy triggers.
capacity_policy: CapacityPolicyPolicy to apply when the WAL reaches max_events.
Implementations§
Source§impl WriteAheadLogConfig
impl WriteAheadLogConfig
Sourcepub fn validate(&self) -> Result<(), WalError>
pub fn validate(&self) -> Result<(), WalError>
Validate the config. Returns WalError::InvalidConfig if max_events
is below MIN_MAX_EVENTS.
Trait Implementations§
Source§impl Clone for WriteAheadLogConfig
impl Clone for WriteAheadLogConfig
Source§fn clone(&self) -> WriteAheadLogConfig
fn clone(&self) -> WriteAheadLogConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WriteAheadLogConfig
impl Debug for WriteAheadLogConfig
Auto Trait Implementations§
impl Freeze for WriteAheadLogConfig
impl RefUnwindSafe for WriteAheadLogConfig
impl Send for WriteAheadLogConfig
impl Sync for WriteAheadLogConfig
impl Unpin for WriteAheadLogConfig
impl UnsafeUnpin for WriteAheadLogConfig
impl UnwindSafe for WriteAheadLogConfig
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