[−][src]Struct emerald_rs::storage::keyfile::DbStorage
Database backed storage for KeyFile
Fields
db: DB
Database handler
Implementations
impl DbStorage
[src]
pub fn new<P: AsRef<Path>>(dir: P) -> Result<DbStorage, KeystoreError>
[src]
Create new database storage
Use specified directory as parent folder
Storage structure:
key - Address
value - <filename> + SEPARATOR + <keyfile_json>
Arguments:
- dir - parent folder
Trait Implementations
impl KeyfileStorage for DbStorage
[src]
fn put(&self, kf: &KeyFile) -> Result<(), KeystoreError>
[src]
fn delete(&self, addr: &Address) -> Result<(), KeystoreError>
[src]
fn search_by_address(
&self,
addr: &Address
) -> Result<(AccountInfo, KeyFile), KeystoreError>
[src]
&self,
addr: &Address
) -> Result<(AccountInfo, KeyFile), KeystoreError>
fn hide(&self, addr: &Address) -> Result<bool, KeystoreError>
[src]
fn unhide(&self, addr: &Address) -> Result<bool, KeystoreError>
[src]
fn list_accounts(
&self,
show_hidden: bool
) -> Result<Vec<AccountInfo>, KeystoreError>
[src]
&self,
show_hidden: bool
) -> Result<Vec<AccountInfo>, KeystoreError>
fn update(
&self,
addr: &Address,
name: Option<String>,
desc: Option<String>
) -> Result<(), KeystoreError>
[src]
&self,
addr: &Address,
name: Option<String>,
desc: Option<String>
) -> Result<(), KeystoreError>
fn is_addr_exist(&self, addr: &Address) -> Result<(), KeystoreError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for DbStorage
impl Send for DbStorage
impl Sync for DbStorage
impl Unpin for DbStorage
impl UnwindSafe for DbStorage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,