[][src]Struct grin_wallet_impls::LMDBBackend

pub struct LMDBBackend<'ck, C, K> where
    C: NodeClient + 'ck,
    K: Keychain + 'ck, 
{ pub keychain: Option<K>, pub master_checksum: Box<Option<Blake2bResult>>, // some fields omitted }

Fields

keychain: Option<K>

Keychain

master_checksum: Box<Option<Blake2bResult>>

Check value for XORed keychain seed

Methods

impl<'ck, C, K> LMDBBackend<'ck, C, K> where
    C: NodeClient + 'ck,
    K: Keychain + 'ck, 
[src]

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

pub fn exists(data_file_dir: &str) -> 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<'ck, C, K> WalletBackend<'ck, C, K> for LMDBBackend<'ck, C, K> where
    C: NodeClient + 'ck,
    K: Keychain + 'ck, 
[src]

fn set_keychain(
    &mut self,
    k: Box<K>,
    mask: bool,
    use_test_rng: bool
) -> Result<Option<SecretKey>, Error>
[src]

Set the keychain, which should already have been opened

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

Close wallet

fn keychain(&self, mask: Option<&SecretKey>) -> Result<K, Error>[src]

Return the keychain being used, cloned with XORed token value for temporary use

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

Return the node client being used

fn calc_commit_for_cache(
    &mut self,
    keychain_mask: Option<&SecretKey>,
    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<'ck, C, K> !RefUnwindSafe for LMDBBackend<'ck, C, K>

impl<'ck, C, K> Send for LMDBBackend<'ck, C, K>

impl<'ck, C, K> Sync for LMDBBackend<'ck, C, K>

impl<'ck, C, K> Unpin for LMDBBackend<'ck, C, K> where
    C: Unpin,
    K: Unpin

impl<'ck, C, K> !UnwindSafe for LMDBBackend<'ck, C, K>

Blanket Implementations

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

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

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

impl<T> Erased for T

impl<T> From<T> for T[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,