Struct bpstd::LeafScript 
source · pub struct LeafScript {
    pub version: LeafVer,
    pub script: ScriptBytes,
}Fields§
§version: LeafVer§script: ScriptBytesImplementations§
source§impl LeafScript
 
impl LeafScript
pub fn new(version: LeafVer, script: ScriptBytes) -> LeafScript
pub fn with_bytes( version: LeafVer, script: Vec<u8> ) -> Result<LeafScript, Error>
pub fn from_tap_script(tap_script: TapScript) -> LeafScript
pub fn as_script_bytes(&self) -> &ScriptBytes
pub fn tap_leaf_hash(&self) -> TapLeafHash
Trait Implementations§
source§impl Clone for LeafScript
 
impl Clone for LeafScript
source§fn clone(&self) -> LeafScript
 
fn clone(&self) -> LeafScript
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 LeafScript
 
impl Debug for LeafScript
source§impl Decode for LeafScript
 
impl Decode for LeafScript
fn decode(reader: &mut impl Read) -> Result<LeafScript, DecodeError>
fn deserialize(bytes: impl AsRef<[u8]>) -> Result<Self, PsbtError>
source§impl Default for LeafScript
 
impl Default for LeafScript
source§fn default() -> LeafScript
 
fn default() -> LeafScript
Returns the “default value” for a type. Read more
source§impl Display for LeafScript
 
impl Display for LeafScript
source§impl Encode for LeafScript
 
impl Encode for LeafScript
source§impl From<TapScript> for LeafScript
 
impl From<TapScript> for LeafScript
source§fn from(tap_script: TapScript) -> LeafScript
 
fn from(tap_script: TapScript) -> LeafScript
Converts to this type from the input type.
source§impl Hash for LeafScript
 
impl Hash for LeafScript
source§impl Ord for LeafScript
 
impl Ord for LeafScript
source§fn cmp(&self, other: &LeafScript) -> Ordering
 
fn cmp(&self, other: &LeafScript) -> 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 LeafScript
 
impl PartialEq for LeafScript
source§fn eq(&self, other: &LeafScript) -> bool
 
fn eq(&self, other: &LeafScript) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.source§impl PartialOrd for LeafScript
 
impl PartialOrd for LeafScript
source§fn partial_cmp(&self, other: &LeafScript) -> Option<Ordering>
 
fn partial_cmp(&self, other: &LeafScript) -> 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 StrictDecode for LeafScript
 
impl StrictDecode for LeafScript
fn strict_decode(reader: &mut impl TypedRead) -> Result<LeafScript, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
source§impl StrictEncode for LeafScript
 
impl StrictEncode for LeafScript
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
    W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
source§impl StrictStruct for LeafScript
 
impl StrictStruct for LeafScript
const ALL_FIELDS: &'static [&'static str] = _
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for LeafScript
 
impl StrictType for LeafScript
const STRICT_LIB_NAME: &'static str = LIB_NAME_BITCOIN
fn strict_name() -> Option<TypeName>
impl Eq for LeafScript
impl StrictProduct for LeafScript
impl StructuralPartialEq for LeafScript
Auto Trait Implementations§
impl Freeze for LeafScript
impl RefUnwindSafe for LeafScript
impl Send for LeafScript
impl Sync for LeafScript
impl Unpin for LeafScript
impl UnwindSafe for LeafScript
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<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§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
Compare self to 
key and return true if they are equal.