#[non_exhaustive]pub enum CadencePolicy {
Default,
Disabled,
Every(SnapshotCadence),
}Expand description
What the snapshot cadence should do, for Tuning::cadence.
§Why this is not Option<SnapshotCadence>
Database::open_with_cadence takes Option<SnapshotCadence>, where None
means no cadence at all. Carrying that field into Tuning unchanged
would have made it the one field in the struct whose None is a request to
change the behaviour rather than a request to leave it alone — and since
Tuning derives Default, open_tuned(path, Tuning::default()) would then
have silently disabled snapshots, while open(path) runs them. Two calls
that read as synonyms, one of which stops writing anchors.
So the tri-state is written out. Default is the default cadence, matching
Database::open; Disabled is open_with_cadence(path, None), and has to
be asked for by name.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Default
SnapshotCadence::default, as Database::open uses.
Disabled
No cadence task. close() is then the only thing that writes an anchor
(§5.5, D-053).
Every(SnapshotCadence)
An explicit cadence.
Trait Implementations§
Source§impl Clone for CadencePolicy
impl Clone for CadencePolicy
Source§fn clone(&self) -> CadencePolicy
fn clone(&self) -> CadencePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CadencePolicy
Source§impl Debug for CadencePolicy
impl Debug for CadencePolicy
Source§impl Default for CadencePolicy
impl Default for CadencePolicy
Source§fn default() -> CadencePolicy
fn default() -> CadencePolicy
impl Eq for CadencePolicy
Source§impl PartialEq for CadencePolicy
impl PartialEq for CadencePolicy
impl StructuralPartialEq for CadencePolicy
Auto Trait Implementations§
impl Freeze for CadencePolicy
impl RefUnwindSafe for CadencePolicy
impl Send for CadencePolicy
impl Sync for CadencePolicy
impl Unpin for CadencePolicy
impl UnsafeUnpin for CadencePolicy
impl UnwindSafe for CadencePolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request