Struct PsbtSighashType
pub struct PsbtSighashType { /* private fields */ }Expand description
A Signature hash type for the corresponding input.
As of taproot upgrade, the signature hash type can be either EcdsaSighashType or
TapSighashType but it is not possible to know directly which signature hash type the user is
dealing with. Therefore, the user is responsible for converting to/from PsbtSighashType
from/to the desired signature hash type they need.
Implementations§
§impl PsbtSighashType
impl PsbtSighashType
pub fn ecdsa_hash_ty(
self,
) -> Result<EcdsaSighashType, NonStandardSighashTypeError>
pub fn ecdsa_hash_ty( self, ) -> Result<EcdsaSighashType, NonStandardSighashTypeError>
Returns the EcdsaSighashType if the PsbtSighashType can be
converted to one.
pub fn taproot_hash_ty(self) -> Result<TapSighashType, InvalidSighashTypeError>
pub fn taproot_hash_ty(self) -> Result<TapSighashType, InvalidSighashTypeError>
Returns the TapSighashType if the PsbtSighashType can be
converted to one.
pub fn from_u32(n: u32) -> PsbtSighashType
pub fn from_u32(n: u32) -> PsbtSighashType
Creates a PsbtSighashType from a raw u32.
Allows construction of a non-standard or non-valid sighash flag
(EcdsaSighashType, TapSighashType respectively).
pub fn to_u32(self) -> u32
pub fn to_u32(self) -> u32
Converts PsbtSighashType to a raw u32 sighash flag.
No guarantees are made as to the standardness or validity of the returned value.
Trait Implementations§
§impl Clone for PsbtSighashType
impl Clone for PsbtSighashType
§fn clone(&self) -> PsbtSighashType
fn clone(&self) -> PsbtSighashType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for PsbtSighashType
impl Debug for PsbtSighashType
§impl<'de> Deserialize<'de> for PsbtSighashType
impl<'de> Deserialize<'de> for PsbtSighashType
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PsbtSighashType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PsbtSighashType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Display for PsbtSighashType
impl Display for PsbtSighashType
§impl From<EcdsaSighashType> for PsbtSighashType
impl From<EcdsaSighashType> for PsbtSighashType
§fn from(ecdsa_hash_ty: EcdsaSighashType) -> PsbtSighashType
fn from(ecdsa_hash_ty: EcdsaSighashType) -> PsbtSighashType
§impl From<TapSighashType> for PsbtSighashType
impl From<TapSighashType> for PsbtSighashType
§fn from(taproot_hash_ty: TapSighashType) -> PsbtSighashType
fn from(taproot_hash_ty: TapSighashType) -> PsbtSighashType
§impl FromStr for PsbtSighashType
impl FromStr for PsbtSighashType
§type Err = SighashTypeParseError
type Err = SighashTypeParseError
§fn from_str(
s: &str,
) -> Result<PsbtSighashType, <PsbtSighashType as FromStr>::Err>
fn from_str( s: &str, ) -> Result<PsbtSighashType, <PsbtSighashType as FromStr>::Err>
s to return a value of this type. Read more§impl Hash for PsbtSighashType
impl Hash for PsbtSighashType
§impl Ord for PsbtSighashType
impl Ord for PsbtSighashType
§impl PartialEq for PsbtSighashType
impl PartialEq for PsbtSighashType
§impl PartialOrd for PsbtSighashType
impl PartialOrd for PsbtSighashType
§impl Serialize for PsbtSighashType
impl Serialize for PsbtSighashType
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for PsbtSighashType
impl Eq for PsbtSighashType
impl StructuralPartialEq for PsbtSighashType
Auto Trait Implementations§
impl Freeze for PsbtSighashType
impl RefUnwindSafe for PsbtSighashType
impl Send for PsbtSighashType
impl Sync for PsbtSighashType
impl Unpin for PsbtSighashType
impl UnwindSafe for PsbtSighashType
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.