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 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
sourceimpl AsMut<<LockScript as Wrapper>::Inner> for LockScript
impl AsMut<<LockScript as Wrapper>::Inner> for LockScript
sourceimpl AsRef<<LockScript as Wrapper>::Inner> for LockScript
impl AsRef<<LockScript as Wrapper>::Inner> for LockScript
sourceimpl Borrow<<LockScript as Wrapper>::Inner> for LockScript
impl Borrow<<LockScript as Wrapper>::Inner> for LockScript
sourceimpl BorrowMut<<LockScript as Wrapper>::Inner> for LockScript
impl BorrowMut<<LockScript as Wrapper>::Inner> for LockScript
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 LockScript
impl Clone for LockScript
sourcefn clone(&self) -> LockScript
fn clone(&self) -> LockScript
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 LockScript
impl Debug for LockScript
sourceimpl Default for LockScript
impl Default for LockScript
sourcefn default() -> LockScript
fn default() -> LockScript
Returns the “default value” for a type. Read more
sourceimpl Deref for LockScript
impl Deref for LockScript
sourceimpl DerefMut for LockScript
impl DerefMut for LockScript
sourceimpl Display for LockScript
impl Display for LockScript
sourceimpl From<LockScript> for Script
impl From<LockScript> for Script
sourcefn from(wrapped: LockScript) -> Self
fn from(wrapped: LockScript) -> Self
Converts to this type from the input type.
sourceimpl From<LockScript> for WitnessScript
impl From<LockScript> for WitnessScript
sourcefn from(lock_script: LockScript) -> Self
fn from(lock_script: LockScript) -> Self
Converts to this type from the input type.
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<LockScript> for TapScript
impl From<LockScript> for TapScript
sourcefn from(lock_script: LockScript) -> Self
fn from(lock_script: LockScript) -> 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 LockScript
impl From<Script> for LockScript
sourceimpl From<WitnessScript> for LockScript
impl From<WitnessScript> for LockScript
sourcefn from(witness_script: WitnessScript) -> Self
fn from(witness_script: WitnessScript) -> Self
Converts to this type from the input type.
sourceimpl Hash for LockScript
impl Hash for LockScript
sourceimpl LowerHex for LockScript
impl LowerHex for LockScript
sourceimpl Ord for LockScript
impl Ord for LockScript
sourceimpl PartialEq<LockScript> for LockScript
impl PartialEq<LockScript> for LockScript
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &LockScript) -> bool
fn ne(&self, other: &LockScript) -> bool
This method tests for !=
.
sourceimpl PartialOrd<LockScript> for LockScript
impl PartialOrd<LockScript> for LockScript
sourcefn partial_cmp(&self, other: &LockScript) -> Option<Ordering>
fn partial_cmp(&self, other: &LockScript) -> 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 LockScript
impl Strategy for LockScript
sourceimpl ToPubkeyScript for LockScript
impl ToPubkeyScript for LockScript
sourcefn to_pubkey_script(&self, strategy: ConvertInfo) -> Option<PubkeyScript>
fn to_pubkey_script(&self, strategy: ConvertInfo) -> Option<PubkeyScript>
Never returns None
sourceimpl ToScripts for LockScript
impl ToScripts for LockScript
sourcefn to_sig_script(&self, strategy: ConvertInfo) -> Option<SigScript>
fn to_sig_script(&self, strategy: ConvertInfo) -> Option<SigScript>
Never returns None
sourcefn 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
contexts Read more
sourcefn 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 context Read more
sourceimpl UpperHex for LockScript
impl UpperHex for LockScript
sourceimpl Wrapper for LockScript
impl Wrapper for LockScript
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 LockScript
impl StructuralEq for LockScript
impl StructuralPartialEq for LockScript
Auto Trait Implementations
impl RefUnwindSafe for LockScript
impl Send for LockScript
impl Sync for LockScript
impl Unpin for LockScript
impl UnwindSafe for LockScript
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