pub struct RedbStore { /* private fields */ }Expand description
Redb-backed storage. Stores wallet metadata and transaction history
in per-wallet redb files under data_dir.
Implementations§
Trait Implementations§
Source§impl PayStore for RedbStore
impl PayStore for RedbStore
fn save_wallet_metadata(&self, meta: &WalletMetadata) -> Result<(), PayError>
fn load_wallet_metadata( &self, wallet_id: &str, ) -> Result<WalletMetadata, PayError>
fn list_wallet_metadata( &self, network: Option<Network>, ) -> Result<Vec<WalletMetadata>, PayError>
fn delete_wallet_metadata(&self, wallet_id: &str) -> Result<(), PayError>
fn wallet_directory_path(&self, wallet_id: &str) -> Result<PathBuf, PayError>
fn wallet_data_directory_path( &self, wallet_id: &str, ) -> Result<PathBuf, PayError>
fn wallet_data_directory_path_for_meta(&self, meta: &WalletMetadata) -> PathBuf
fn resolve_wallet_id(&self, id_or_label: &str) -> Result<String, PayError>
fn append_transaction_record( &self, record: &HistoryRecord, ) -> Result<(), PayError>
fn load_wallet_transaction_records( &self, wallet_id: &str, ) -> Result<Vec<HistoryRecord>, PayError>
fn find_transaction_record_by_id( &self, tx_id: &str, ) -> Result<Option<HistoryRecord>, PayError>
fn update_transaction_record_memo( &self, tx_id: &str, memo: Option<&BTreeMap<String, String>>, ) -> Result<(), PayError>
fn update_transaction_record_fee( &self, tx_id: &str, fee_value: u64, fee_unit: &str, ) -> Result<(), PayError>
fn drain_migration_log(&self) -> Vec<MigrationLog>
Auto Trait Implementations§
impl Freeze for RedbStore
impl RefUnwindSafe for RedbStore
impl Send for RedbStore
impl Sync for RedbStore
impl Unpin for RedbStore
impl UnsafeUnpin for RedbStore
impl UnwindSafe for RedbStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request