Struct bitcoin_scripts::RedeemScript
source · [−]pub struct RedeemScript(_);
Expand description
Redeem script as part of the witness
or scriptSig
structure; it is
hashed for P2(W)SH output.
Implementations
sourceimpl RedeemScript
impl RedeemScript
sourcepub fn script_hash(&self) -> ScriptHash
pub fn script_hash(&self) -> ScriptHash
Computes script commitment hash which participates in PubkeyScript
sourcepub fn to_p2sh(&self) -> PubkeyScript
pub fn to_p2sh(&self) -> PubkeyScript
Generates PubkeyScript
matching given redeemScript
Trait Implementations
sourceimpl AsMut<<RedeemScript as Wrapper>::Inner> for RedeemScript
impl AsMut<<RedeemScript as Wrapper>::Inner> for RedeemScript
sourceimpl AsRef<<RedeemScript as Wrapper>::Inner> for RedeemScript
impl AsRef<<RedeemScript as Wrapper>::Inner> for RedeemScript
sourceimpl Borrow<<RedeemScript as Wrapper>::Inner> for RedeemScript
impl Borrow<<RedeemScript as Wrapper>::Inner> for RedeemScript
sourceimpl BorrowMut<<RedeemScript as Wrapper>::Inner> for RedeemScript
impl BorrowMut<<RedeemScript as Wrapper>::Inner> for RedeemScript
sourcefn borrow_mut(&mut self) -> &mut <Self as Wrapper>::Inner
fn borrow_mut(&mut self) -> &mut <Self as Wrapper>::Inner
Mutably borrows from an owned value. Read more
sourceimpl Clone for RedeemScript
impl Clone for RedeemScript
sourcefn clone(&self) -> RedeemScript
fn clone(&self) -> RedeemScript
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RedeemScript
impl Debug for RedeemScript
sourceimpl Default for RedeemScript
impl Default for RedeemScript
sourcefn default() -> RedeemScript
fn default() -> RedeemScript
Returns the “default value” for a type. Read more
sourceimpl Deref for RedeemScript
impl Deref for RedeemScript
sourceimpl DerefMut for RedeemScript
impl DerefMut for RedeemScript
sourceimpl Display for RedeemScript
impl Display for RedeemScript
sourceimpl From<LockScript> for RedeemScript
impl From<LockScript> for RedeemScript
sourcefn from(lock_script: LockScript) -> Self
fn from(lock_script: LockScript) -> Self
Converts to this type from the input type.
sourceimpl From<RedeemScript> for Script
impl From<RedeemScript> for Script
sourcefn from(wrapped: RedeemScript) -> Self
fn from(wrapped: RedeemScript) -> Self
Converts to this type from the input type.
sourceimpl From<RedeemScript> for SigScript
impl From<RedeemScript> for SigScript
sourcefn from(redeem_script: RedeemScript) -> Self
fn from(redeem_script: RedeemScript) -> Self
Converts to this type from the input type.
sourceimpl From<RedeemScript> for LockScript
impl From<RedeemScript> for LockScript
sourcefn from(redeem_script: RedeemScript) -> Self
fn from(redeem_script: RedeemScript) -> Self
Converts to this type from the input type.
sourceimpl From<Script> for RedeemScript
impl From<Script> for RedeemScript
sourceimpl From<WitnessScript> for RedeemScript
impl From<WitnessScript> for RedeemScript
sourcefn from(witness_script: WitnessScript) -> Self
fn from(witness_script: WitnessScript) -> Self
Converts to this type from the input type.
sourceimpl Hash for RedeemScript
impl Hash for RedeemScript
sourceimpl LowerHex for RedeemScript
impl LowerHex for RedeemScript
sourceimpl Ord for RedeemScript
impl Ord for RedeemScript
sourceimpl PartialEq<RedeemScript> for RedeemScript
impl PartialEq<RedeemScript> for RedeemScript
sourcefn eq(&self, other: &RedeemScript) -> bool
fn eq(&self, other: &RedeemScript) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RedeemScript) -> bool
fn ne(&self, other: &RedeemScript) -> bool
This method tests for !=
.
sourceimpl PartialOrd<RedeemScript> for RedeemScript
impl PartialOrd<RedeemScript> for RedeemScript
sourcefn partial_cmp(&self, other: &RedeemScript) -> Option<Ordering>
fn partial_cmp(&self, other: &RedeemScript) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl Strategy for RedeemScript
impl Strategy for RedeemScript
sourceimpl ToPubkeyScript for RedeemScript
impl ToPubkeyScript for RedeemScript
sourcefn to_pubkey_script(&self, strategy: ConvertInfo) -> Option<PubkeyScript>
fn to_pubkey_script(&self, strategy: ConvertInfo) -> Option<PubkeyScript>
Generates scriptPubkey
matching the given RedeemScript
. Fails by
returning None
for the following contexts, where redeemScript
is not
present:
sourceimpl UpperHex for RedeemScript
impl UpperHex for RedeemScript
sourceimpl Wrapper for RedeemScript
impl Wrapper for RedeemScript
sourcefn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
sourcefn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
sourcefn as_inner_mut(&mut self) -> &mut Self::Inner
fn as_inner_mut(&mut self) -> &mut Self::Inner
Returns a mutable reference to the inner representation for the wrapper type Read more
sourcefn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner type
impl Eq for RedeemScript
impl StructuralEq for RedeemScript
impl StructuralPartialEq for RedeemScript
Auto Trait Implementations
impl RefUnwindSafe for RedeemScript
impl Send for RedeemScript
impl Sync for RedeemScript
impl Unpin for RedeemScript
impl UnwindSafe for RedeemScript
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
impl<T> ToHex for T where
T: LowerHex,
impl<T> ToHex for T where
T: LowerHex,
impl<T> ToHex for T where
T: LowerHex,
impl<T> ToHex for T where
T: LowerHex,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more