pub struct DescriptorImpl { /* private fields */ }
Expand description

| Base class for all Descriptor implementations. |

Implementations§

source§

impl DescriptorImpl

source

pub fn new(pubkeys: Vec<Box<PubkeyProvider>>, name: &String) -> Self

source

pub fn new_with_script( pubkeys: Vec<Box<PubkeyProvider>>, script: Box<DescriptorImpl>, name: &String ) -> Self

source

pub fn new_with_scripts( pubkeys: Vec<Box<PubkeyProvider>>, scripts: Vec<Box<DescriptorImpl>>, name: &String ) -> Self

source

pub fn to_string_helper( &self, arg: *const SigningProvider, out: &mut String, ty: DescriptorImplStringType, cache: Option<*const DescriptorCache> ) -> bool

source

pub fn expand_helper( &self, pos: i32, arg: &SigningProvider, read_cache: *const DescriptorCache, output_scripts: &mut Vec<Script>, out: &mut FlatSigningProvider, write_cache: *mut DescriptorCache ) -> bool

Trait Implementations§

source§

impl Expand for DescriptorImpl

source§

fn expand( &self, pos: i32, provider: &SigningProvider, output_scripts: &mut Vec<Script>, out: &mut FlatSigningProvider, write_cache: Option<*mut DescriptorCache> ) -> bool

| Expand a descriptor at a specified position. | | ———– | @param[in] pos | | The position at which to expand the descriptor. | If IsRange() is false, this is ignored. | ––––– | @param[in] provider | | The provider to query for private keys | in case of hardened derivation. | ––––– | @param[out] output_scripts | | The expanded scriptPubKeys. | ––––– | @param[out] out | | Scripts and public keys necessary for | solving the expanded scriptPubKeys | (may be equal to provider). | ––––– | @param[out] write_cache | | Cache data necessary to evaluate the | descriptor at this point without access | to private keys. |
source§

impl ExpandFromCache for DescriptorImpl

source§

fn expand_from_cache( &self, pos: i32, read_cache: &DescriptorCache, output_scripts: &mut Vec<Script>, out: &mut FlatSigningProvider ) -> bool

| Expand a descriptor at a specified position | using cached expansion data. | | ———– | @param[in] pos | | The position at which to expand the descriptor. | If IsRange() is false, this is ignored. | ––––– | @param[in] read_cache | | Cached expansion data. | ––––– | @param[out] output_scripts | | The expanded scriptPubKeys. | ––––– | @param[out] out | | Scripts and public keys necessary for | solving the expanded scriptPubKeys | (may be equal to provider). |
source§

impl ExpandPrivate for DescriptorImpl

source§

fn expand_private( &self, pos: i32, provider: &SigningProvider, out: &mut FlatSigningProvider )

| Expand the private key for a descriptor | at a specified position, if possible. | | ———– | @param[in] pos | | The position at which to expand the descriptor. | If IsRange() is false, this is ignored. | ––––– | @param[in] provider | | The provider to query for the private | keys. | ––––– | @param[out] out | | Any private keys available for the specified | pos. |
source§

impl GetOutputType for DescriptorImpl

source§

fn get_output_type(&self) -> Option<OutputType>

| @return | | The OutputType of the scriptPubKey(s) | produced by this descriptor. Or nullopt | if indeterminate (multiple or none) |
source§

impl IsRange for DescriptorImpl

source§

fn is_range(&self) -> bool

source§

impl IsSolvable for DescriptorImpl

source§

impl ToNormalizedString for DescriptorImpl

source§

fn to_normalized_string( &self, arg: &SigningProvider, out: &mut String, cache: *const DescriptorCache ) -> bool

| Convert the descriptor to a normalized | string. Normalized descriptors have | the xpub at the last hardened step. This | fails if the provided provider does | not have the private keys to derive that | xpub. | Read more
source§

impl ToPrivateString for DescriptorImpl

source§

fn to_private_string(&self, arg: &SigningProvider, out: &mut String) -> bool

| Convert the descriptor to a private | string. This fails if the provided provider | does not have the relevant private keys. | Read more
source§

impl ToString for DescriptorImpl

source§

impl ToStringExtra for DescriptorImpl

source§

fn to_string_extra(&self) -> String

| Return a serialization of anything | except pubkey and script arguments, | to be prepended to those. |

source§

impl ToStringSubScriptHelper for DescriptorImpl

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
§

impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,

§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> StaticUpcast<T> for T

§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V