Enum sc_state_db::PruningMode
source · pub enum PruningMode {
Constrained(Constraints),
ArchiveAll,
ArchiveCanonical,
}
Expand description
Pruning mode.
Variants§
Constrained(Constraints)
Maintain a pruning window.
ArchiveAll
No pruning. Canonicalization is a no-op.
ArchiveCanonical
Canonicalization discards non-canonical nodes. All the canonical nodes are kept in the DB.
Implementations§
source§impl PruningMode
impl PruningMode
sourcepub fn blocks_pruning(n: u32) -> PruningMode
pub fn blocks_pruning(n: u32) -> PruningMode
Create a mode that keeps given number of blocks.
sourcepub fn is_archive(&self) -> bool
pub fn is_archive(&self) -> bool
Is this an archive (either ArchiveAll or ArchiveCanonical) pruning mode?
pub fn from_id(id: &[u8]) -> Option<Self>
Trait Implementations§
source§impl Clone for PruningMode
impl Clone for PruningMode
source§fn clone(&self) -> PruningMode
fn clone(&self) -> PruningMode
Returns a copy 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 PruningMode
impl Debug for PruningMode
source§impl Default for PruningMode
impl Default for PruningMode
source§impl PartialEq<PruningMode> for PruningMode
impl PartialEq<PruningMode> for PruningMode
source§fn eq(&self, other: &PruningMode) -> bool
fn eq(&self, other: &PruningMode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.