Enum journaldb::Algorithm [−][src]
pub enum Algorithm { Archive, EarlyMerge, OverlayRecent, RefCounted, }
Journal database operating strategy.
Variants
Archive
Keep all keys forever.
EarlyMerge
Ancient and recent history maintained separately; recent history lasts for particular number of blocks.
Inserts go into backing database, journal retains knowledge of whether backing DB key is ancient or recent. Non-canon inserts get explicitly reverted and removed from backing DB.
OverlayRecent
Ancient and recent history maintained separately; recent history lasts for particular number of blocks.
Inserts go into memory overlay, which is tried for key fetches. Memory overlay gets flushed in backing only at end of recent history.
RefCounted
Ancient and recent history maintained separately; recent history lasts for particular number of blocks.
References are counted in disk-backed DB.
Methods
impl Algorithm
[src]
impl Algorithm
pub fn as_str(&self) -> &'static str
[src]
pub fn as_str(&self) -> &'static str
Returns static str describing journal database algorithm.
pub fn as_internal_name_str(&self) -> &'static str
[src]
pub fn as_internal_name_str(&self) -> &'static str
Returns static str describing journal database algorithm.
pub fn is_stable(&self) -> bool
[src]
pub fn is_stable(&self) -> bool
Returns true if pruning strategy is stable
pub fn all_types() -> Vec<Algorithm>
[src]
pub fn all_types() -> Vec<Algorithm>
Returns all algorithm types.
Trait Implementations
impl Debug for Algorithm
[src]
impl Debug for Algorithm
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Algorithm
[src]
impl PartialEq for Algorithm
fn eq(&self, other: &Algorithm) -> bool
[src]
fn eq(&self, other: &Algorithm) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Clone for Algorithm
[src]
impl Clone for Algorithm
fn clone(&self) -> Algorithm
[src]
fn clone(&self) -> Algorithm
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Algorithm
[src]
impl Copy for Algorithm
impl FromStr for Algorithm
[src]
impl FromStr for Algorithm
type Err = String
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a string s
to return a value of this type. Read more
impl Display for Algorithm
[src]
impl Display for Algorithm