WalletDescr

Struct WalletDescr 

Source
pub struct WalletDescr<K, D, L2 = Layer2Empty>
where D: Descriptor<K>, L2: Layer2Descriptor,
{ /* private fields */ }

Implementations§

Source§

impl<K, D, L2> WalletDescr<K, D, L2>
where D: Descriptor<K>, L2: Layer2Descriptor,

Source

pub fn generator(&self) -> &D

Method borrowing WalletDescr::generator field.

Source

pub fn network(&self) -> Network

Method returning copy of WalletDescr::network field.

Source

pub fn layer2(&self) -> &L2

Method borrowing WalletDescr::layer2 field.

Source

pub fn _phantom(&self) -> &PhantomData<K>

Method borrowing WalletDescr::_phantom field.

Source§

impl<K, D: Descriptor<K>> WalletDescr<K, D, Layer2Empty>

Source

pub fn new_standard(descr: D, network: Network) -> Self

Source§

impl<K, D: Descriptor<K>, L2: Layer2Descriptor> WalletDescr<K, D, L2>

Source

pub fn new_layer2(descr: D, layer2: L2, network: Network) -> Self

Source

pub fn addresses(&self, keychain: impl Into<Keychain>) -> AddrIter<'_, K, D>

Source

pub fn with_descriptor<T, E>( &mut self, f: impl FnOnce(&mut D) -> Result<T, E>, ) -> Result<T, E>

Trait Implementations§

Source§

impl<K, D: Descriptor<K>, L2: Layer2Descriptor> CloneNoPersistence for WalletDescr<K, D, L2>

Source§

impl<K: Debug, D, L2> Debug for WalletDescr<K, D, L2>
where D: Descriptor<K> + Debug, L2: Layer2Descriptor + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<K, D: Descriptor<K>, L2: Layer2Descriptor> Deref for WalletDescr<K, D, L2>

Source§

type Target = D

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<K, D: Descriptor<K>, L2: Layer2Descriptor> Drop for WalletDescr<K, D, L2>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<K, D: Descriptor<K>, L2: Layer2Descriptor> Persisting for WalletDescr<K, D, L2>

Source§

fn persistence(&self) -> Option<&Persistence<Self>>

Source§

fn persistence_mut(&mut self) -> Option<&mut Persistence<Self>>

Source§

fn as_mut_persistence(&mut self) -> &mut Option<Persistence<Self>>

Source§

fn load( provider: impl PersistenceProvider<Self> + 'static, autosave: bool, ) -> Result<Self, PersistenceError>

Source§

fn is_persisted(&self) -> bool

Source§

fn is_dirty(&self) -> bool

Source§

fn mark_dirty(&mut self)

Source§

fn is_autosave(&self) -> bool

Source§

fn set_autosave(&mut self)

Source§

fn make_persistent( &mut self, provider: impl PersistenceProvider<Self> + 'static, autosave: bool, ) -> Result<bool, PersistenceError>

Returns whether the object was persisting before this method.
Source§

fn store(&mut self) -> Result<(), PersistenceError>

Auto Trait Implementations§

§

impl<K, D, L2> Freeze for WalletDescr<K, D, L2>
where D: Freeze, L2: Freeze,

§

impl<K, D, L2 = Layer2Empty> !RefUnwindSafe for WalletDescr<K, D, L2>

§

impl<K, D, L2> Send for WalletDescr<K, D, L2>
where D: Send, L2: Send, K: Send,

§

impl<K, D, L2> Sync for WalletDescr<K, D, L2>
where D: Sync, L2: Sync, K: Sync,

§

impl<K, D, L2> Unpin for WalletDescr<K, D, L2>
where D: Unpin, L2: Unpin, K: Unpin,

§

impl<K, D, L2 = Layer2Empty> !UnwindSafe for WalletDescr<K, D, L2>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.