[][src]Struct grin_wallet_impls::LMDBBackend

pub struct LMDBBackend<C, K> {
    pub keychain: Option<K>,
    // some fields omitted
}

Fields

keychain: Option<K>

Keychain

Methods

impl<C, K> LMDBBackend<C, K>[src]

pub fn new(
    config: WalletConfig,
    passphrase: &str,
    n_client: C
) -> Result<Self, Error>
[src]

pub fn exists(config: WalletConfig) -> bool[src]

Just test to see if database files exist in the current directory. If so, use a DB backend for all operations

Trait Implementations

impl<C, K> WalletBackend<C, K> for LMDBBackend<C, K> where
    C: NodeClient,
    K: Keychain, 
[src]

fn open_with_credentials(&mut self) -> Result<(), Error>[src]

Initialise with whatever stored credentials we have

fn close(&mut self) -> Result<(), Error>[src]

Close wallet and remove any stored credentials (TBD)

fn keychain(&mut self) -> &mut K[src]

Return the keychain being used

fn w2n_client(&mut self) -> &mut C[src]

Return the node client being used

fn calc_commit_for_cache(
    &mut self,
    amount: u64,
    id: &Identifier
) -> Result<Option<String>, Error>
[src]

return the version of the commit for caching

fn set_parent_key_id_by_name(&mut self, label: &str) -> Result<(), Error>[src]

Set parent path by account name

fn set_parent_key_id(&mut self, id: Identifier)[src]

set parent path

Auto Trait Implementations

impl<C, K> Send for LMDBBackend<C, K> where
    C: Send,
    K: Send

impl<C, K> Sync for LMDBBackend<C, K> where
    C: Sync,
    K: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any

impl<T> SafeBorrow for T where
    T: ?Sized

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self

impl<T, C, K> WalletInst for T where
    C: NodeClient,
    K: Keychain,
    T: WalletBackend<C, K> + Send + Sync + 'static, 
[src]