# Enum ethcore_util::journaldb::Algorithm [−] [src]

    pub enum Algorithm {
        Archive,
        EarlyMerge,
        OverlayRecent,
        RefCounted,
    }

A journal database algorithm.

## 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]

#### `fn as_str(&self) -> &'static str`

Returns static str describing journal database algorithm.

#### `fn as_internal_name_str(&self) -> &'static str`

Returns static str describing journal database algorithm.

#### `fn is_stable(&self) -> bool`

Returns true if pruning strategy is stable

#### `fn all_types() -> Vec<Algorithm>`

Returns all algorithm types.

## Trait Implementations

### `impl Debug for Algorithm`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`

Formats the value using the given formatter.

### `impl PartialEq for Algorithm`
[src]

#### `fn eq(&self, __arg_0: &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

This method tests for `!=`.

### `impl Clone for Algorithm`
[src]

#### `fn clone(&self) -> Algorithm`

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`
1.0.0

Performs copy-assignment from `source`. Read more

### `impl Copy for Algorithm`
[src]

### `impl Default for Algorithm`
[src]

#### `fn default() -> Algorithm`

Returns the "default value" for a type. Read more

### `impl FromStr for Algorithm`
[src]

#### `type Err = String`

The associated error which can be returned from parsing.

#### `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]

#### `fn fmt(&self, f: &mut Formatter) -> Result`

Formats the value using the given formatter.

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)