pub struct LockScript(/* private fields */);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 duplicate 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 for LockScript
impl PartialEq for LockScript
Source§impl PartialOrd for LockScript
impl PartialOrd for LockScript
Source§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
impl Eq for LockScript
impl StructuralPartialEq for LockScript
Auto Trait Implementations§
impl Freeze for LockScript
impl RefUnwindSafe for LockScript
impl Send for LockScript
impl Sync for LockScript
impl Unpin for LockScript
impl UnwindSafe for LockScript
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> StrictDecode for T
impl<T> StrictDecode for T
Source§fn strict_decode<D>(d: D) -> Result<T, Error>where
D: Read,
fn strict_decode<D>(d: D) -> Result<T, Error>where
D: Read,
Decode with the given
std::io::Read instance; must either
construct an instance or return implementation-specific error type.Source§fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed. Use io::Cursor over the buffer and
StrictDecode::strict_decode to avoid such failures.Source§fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
Reads data from file at
path and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed if file contains remaining
data after the object reconstruction.Source§impl<T> StrictEncode for T
impl<T> StrictEncode for T
Source§fn strict_encode<E>(&self, e: E) -> Result<usize, Error>where
E: Write,
fn strict_encode<E>(&self, e: E) -> Result<usize, Error>where
E: Write,
Encode with the given
std::io::Write instance; must return result
with either amount of bytes encoded – or implementation-specific
error type.Source§fn strict_serialize(&self) -> Result<Vec<u8>, Error>
fn strict_serialize(&self) -> Result<Vec<u8>, Error>
Serializes data as a byte array using
StrictEncode::strict_encode
function