Enum bitcoin::psbt::OutputType
source · #[non_exhaustive]pub enum OutputType {
Bare,
Wpkh,
Wsh,
ShWpkh,
ShWsh,
Sh,
Tr,
}
Expand description
The various output types supported by the Bitcoin network.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Bare
An output of type: pay-to-pubkey or pay-to-pubkey-hash.
Wpkh
A pay-to-witness-pubkey-hash output (P2WPKH).
Wsh
A pay-to-witness-script-hash output (P2WSH).
ShWpkh
A nested segwit output, pay-to-witness-pubkey-hash nested in a pay-to-script-hash.
ShWsh
A nested segwit output, pay-to-witness-script-hash nested in a pay-to-script-hash.
Sh
A pay-to-script-hash output excluding wrapped segwit (P2SH).
Tr
A taproot output (P2TR).
Implementations§
source§impl OutputType
impl OutputType
sourcepub fn signing_algorithm(&self) -> SigningAlgorithm
pub fn signing_algorithm(&self) -> SigningAlgorithm
The signing algorithm used to sign this output type.
Trait Implementations§
source§impl Clone for OutputType
impl Clone for OutputType
source§fn clone(&self) -> OutputType
fn clone(&self) -> OutputType
Returns a copy of the value. Read more
1.0.0 · 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 OutputType
impl Debug for OutputType
source§impl Hash for OutputType
impl Hash for OutputType
source§impl Ord for OutputType
impl Ord for OutputType
source§fn cmp(&self, other: &OutputType) -> Ordering
fn cmp(&self, other: &OutputType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<OutputType> for OutputType
impl PartialEq<OutputType> for OutputType
source§fn eq(&self, other: &OutputType) -> bool
fn eq(&self, other: &OutputType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<OutputType> for OutputType
impl PartialOrd<OutputType> for OutputType
source§fn partial_cmp(&self, other: &OutputType) -> Option<Ordering>
fn partial_cmp(&self, other: &OutputType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for OutputType
impl Eq for OutputType
impl StructuralEq for OutputType
impl StructuralPartialEq for OutputType
Auto Trait Implementations§
impl RefUnwindSafe for OutputType
impl Send for OutputType
impl Sync for OutputType
impl Unpin for OutputType
impl UnwindSafe for OutputType
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