pub struct LabelledWallet<'a> {
pub wallet: &'a mut Wallet,
pub labels: &'a mut LabelChangeset,
}Expand description
A wrapper around a BDK Wallet and a LabelChangeset that provides BIP-329 functionality.
This struct enables direct manipulation of wallet labels while holding mutable references to both the underlying wallet state and the current label changeset.
Fields§
§wallet: &'a mut WalletA mutable reference to the underlying BDK wallet.
labels: &'a mut LabelChangesetA mutable reference to the current in-memory label state.
Implementations§
Source§impl LabelledWallet<'_>
impl LabelledWallet<'_>
Trait Implementations§
Source§impl Bip329 for LabelledWallet<'_>
impl Bip329 for LabelledWallet<'_>
Source§fn add_label(
&mut self,
target: impl Into<LabelTarget>,
label_text: impl Into<String>,
) -> Result<Label, Error>
fn add_label( &mut self, target: impl Into<LabelTarget>, label_text: impl Into<String>, ) -> Result<Label, Error>
Adds a new human-readable label to a specified target (e.g., Address, Txid).
Source§fn import_labels<R: BufRead>(
&mut self,
reader: R,
strategy: MergeStrategy,
) -> Result<(), Error>
fn import_labels<R: BufRead>( &mut self, reader: R, strategy: MergeStrategy, ) -> Result<(), Error>
Imports labels from a BIP-329 compliant JSONL stream and merges them with the current state.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for LabelledWallet<'a>
impl<'a> !UnwindSafe for LabelledWallet<'a>
impl<'a> Freeze for LabelledWallet<'a>
impl<'a> Send for LabelledWallet<'a>
impl<'a> Sync for LabelledWallet<'a>
impl<'a> Unpin for LabelledWallet<'a>
impl<'a> UnsafeUnpin for LabelledWallet<'a>
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