Enum bdk::keys::DescriptorKey
source · [−]pub enum DescriptorKey<Ctx: ScriptContext> {
// some variants omitted
}
Expand description
Container for public or secret keys
Implementations
sourceimpl<Ctx: ScriptContext> DescriptorKey<Ctx>
impl<Ctx: ScriptContext> DescriptorKey<Ctx>
sourcepub fn from_public(public: DescriptorPublicKey, networks: ValidNetworks) -> Self
pub fn from_public(public: DescriptorPublicKey, networks: ValidNetworks) -> Self
Create an instance given a public key and a set of valid networks
sourcepub fn from_secret(secret: DescriptorSecretKey, networks: ValidNetworks) -> Self
pub fn from_secret(secret: DescriptorSecretKey, networks: ValidNetworks) -> Self
Create an instance given a secret key and a set of valid networks
sourcepub fn override_valid_networks(self, networks: ValidNetworks) -> Self
pub fn override_valid_networks(self, networks: ValidNetworks) -> Self
Override the computed set of valid networks
Trait Implementations
sourceimpl<Ctx: Debug + ScriptContext> Debug for DescriptorKey<Ctx>
impl<Ctx: Debug + ScriptContext> Debug for DescriptorKey<Ctx>
sourceimpl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for DescriptorKey<Ctx>
impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for DescriptorKey<Ctx>
The “identity” conversion is used internally by some bdk::fragment
s
sourcefn into_descriptor_key(self) -> Result<DescriptorKey<Ctx>, KeyError>
fn into_descriptor_key(self) -> Result<DescriptorKey<Ctx>, KeyError>
Turn the key into a DescriptorKey
within the requested ScriptContext
Auto Trait Implementations
impl<Ctx> RefUnwindSafe for DescriptorKey<Ctx>where
Ctx: RefUnwindSafe,
impl<Ctx> Send for DescriptorKey<Ctx>where
Ctx: Send,
impl<Ctx> Sync for DescriptorKey<Ctx>where
Ctx: Sync,
impl<Ctx> Unpin for DescriptorKey<Ctx>where
Ctx: Unpin,
impl<Ctx> UnwindSafe for DescriptorKey<Ctx>where
Ctx: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more