Struct bitcoin_scripts::LockScript
source · pub struct LockScript(_);Expand description
Script whose knowledge and satisfaction is required for spending some
specific transaction output. This is the deepest nested version of Bitcoin
script containing no hashes of other bitcoin_scripts, including P2SH
redeemScript hashes or witnessProgram (hash or witness script), or
public key hashes. It is also used for representing specific spending branch
of the taproot script tree.
LockScript defines no specific script semantics for opcodes, which is
imposed by other contexts on top of it, like WitnessScript,
LeafScript or TapScript.
Trait Implementations§
source§impl AsMut<<LockScript as Wrapper>::Inner> for LockScript
impl AsMut<<LockScript as Wrapper>::Inner> for LockScript
source§impl AsRef<<LockScript as Wrapper>::Inner> for LockScript
impl AsRef<<LockScript as Wrapper>::Inner> for LockScript
source§impl Borrow<<LockScript as Wrapper>::Inner> for LockScript
impl Borrow<<LockScript as Wrapper>::Inner> for LockScript
source§impl BorrowMut<<LockScript as Wrapper>::Inner> for LockScript
impl BorrowMut<<LockScript as Wrapper>::Inner> for LockScript
source§impl Clone for LockScript
impl Clone for LockScript
source§fn clone(&self) -> LockScript
fn clone(&self) -> LockScript
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 LockScript
impl Debug for LockScript
source§impl Default for LockScript
impl Default for LockScript
source§fn default() -> LockScript
fn default() -> LockScript
Returns the “default value” for a type. Read more
source§impl Deref for LockScript
impl Deref for LockScript
source§impl DerefMut for LockScript
impl DerefMut for LockScript
source§impl Display for LockScript
impl Display for LockScript
source§impl From<LockScript> for RedeemScript
impl From<LockScript> for RedeemScript
source§fn from(lock_script: LockScript) -> Self
fn from(lock_script: LockScript) -> Self
Converts to this type from the input type.
source§impl From<LockScript> for Script
impl From<LockScript> for Script
source§fn from(wrapped: LockScript) -> Self
fn from(wrapped: LockScript) -> Self
Converts to this type from the input type.
source§impl From<LockScript> for TapScript
impl From<LockScript> for TapScript
source§fn from(lock_script: LockScript) -> Self
fn from(lock_script: LockScript) -> Self
Converts to this type from the input type.
source§impl From<LockScript> for WitnessScript
impl From<LockScript> for WitnessScript
source§fn from(lock_script: LockScript) -> Self
fn from(lock_script: LockScript) -> Self
Converts to this type from the input type.
source§impl From<RedeemScript> for LockScript
impl From<RedeemScript> for LockScript
source§fn from(redeem_script: RedeemScript) -> Self
fn from(redeem_script: RedeemScript) -> Self
Converts to this type from the input type.
source§impl From<Script> for LockScript
impl From<Script> for LockScript
source§impl From<WitnessScript> for LockScript
impl From<WitnessScript> for LockScript
source§fn from(witness_script: WitnessScript) -> Self
fn from(witness_script: WitnessScript) -> Self
Converts to this type from the input type.
source§impl Hash for LockScript
impl Hash for LockScript
source§impl LowerHex for LockScript
impl LowerHex for LockScript
source§impl Ord for LockScript
impl Ord for LockScript
source§fn cmp(&self, other: &LockScript) -> Ordering
fn cmp(&self, other: &LockScript) -> 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<LockScript> for LockScript
impl PartialEq<LockScript> for LockScript
source§fn eq(&self, other: &LockScript) -> bool
fn eq(&self, other: &LockScript) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<LockScript> for LockScript
impl PartialOrd<LockScript> for LockScript
source§fn partial_cmp(&self, other: &LockScript) -> Option<Ordering>
fn partial_cmp(&self, other: &LockScript) -> 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 moresource§impl Strategy for LockScript
impl Strategy for LockScript
source§impl ToPubkeyScript for LockScript
impl ToPubkeyScript for LockScript
source§fn to_pubkey_script(&self, strategy: ConvertInfo) -> Option<PubkeyScript>
fn to_pubkey_script(&self, strategy: ConvertInfo) -> Option<PubkeyScript>
Never returns None
source§impl ToScripts for LockScript
impl ToScripts for LockScript
source§fn to_sig_script(&self, strategy: ConvertInfo) -> Option<SigScript>
fn to_sig_script(&self, strategy: ConvertInfo) -> Option<SigScript>
Never returns None
source§fn to_witness(&self, strategy: ConvertInfo) -> Option<Witness>
fn to_witness(&self, strategy: ConvertInfo) -> Option<Witness>
Construct
witness for segwit contexts only; return None on other
contextssource§fn to_scripts(&self, strategy: ConvertInfo) -> Option<ScriptSet>
fn to_scripts(&self, strategy: ConvertInfo) -> Option<ScriptSet>
Construct all transaction script-produced data; fail by returning
None
on non-compressed public keys in segwit contextsource§impl UpperHex for LockScript
impl UpperHex for LockScript
source§impl Wrapper for LockScript
impl Wrapper for LockScript
source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
source§fn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
source§fn 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
source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner type