Enum journaldb::Algorithm [−][src]
pub enum Algorithm {
Archive,
EarlyMerge,
OverlayRecent,
RefCounted,
}Journal database operating strategy.
Variants
ArchiveKeep all keys forever.
EarlyMergeAncient 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.
OverlayRecentAncient 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.
RefCountedAncient 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 Algorithmpub fn as_str(&self) -> &'static str[src]
pub fn as_str(&self) -> &'static strReturns static str describing journal database algorithm.
pub fn as_internal_name_str(&self) -> &'static str[src]
pub fn as_internal_name_str(&self) -> &'static strReturns static str describing journal database algorithm.
pub fn is_stable(&self) -> bool[src]
pub fn is_stable(&self) -> boolReturns 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 Algorithmfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Algorithm[src]
impl PartialEq for Algorithmfn eq(&self, other: &Algorithm) -> bool[src]
fn eq(&self, other: &Algorithm) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Clone for Algorithm[src]
impl Clone for Algorithmfn clone(&self) -> Algorithm[src]
fn clone(&self) -> AlgorithmReturns 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 Algorithmimpl FromStr for Algorithm[src]
impl FromStr for Algorithmtype 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