pub struct LabelStore { /* private fields */ }Expand description
A store for managing labels associated with Bitcoin addresses, transactions, and outpoints.
Implementations§
Source§impl LabelStore
impl LabelStore
Sourcepub fn from_file(config: Config) -> Self
pub fn from_file(config: Config) -> Self
Creates a LabelStore from a file specified in the given configuration.
§Parameters
config: The configuration containing the path to the labels file.
Sourcepub fn enable_persist(self, persist: bool) -> Self
pub fn enable_persist(self, persist: bool) -> Self
Allow to disable persistance of data, useful for tests
Sourcepub fn edit(&mut self, key: LabelKey, value: Option<String>)
pub fn edit(&mut self, key: LabelKey, value: Option<String>)
Edits the label associated with the given key.
If a value is provided, it updates the label. If None is provided, it removes the label.
§Parameters
key: The key for the label to edit.value: An optional new value for the label.
Trait Implementations§
Source§impl Clone for LabelStore
impl Clone for LabelStore
Source§fn clone(&self) -> LabelStore
fn clone(&self) -> LabelStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LabelStore
impl Debug for LabelStore
Source§impl Default for LabelStore
impl Default for LabelStore
Source§fn default() -> LabelStore
fn default() -> LabelStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for LabelStore
impl RefUnwindSafe for LabelStore
impl Send for LabelStore
impl Sync for LabelStore
impl Unpin for LabelStore
impl UnsafeUnpin for LabelStore
impl UnwindSafe for LabelStore
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