pub struct LeafScript {
pub version: LeafVer,
pub script: ScriptBytes,
}
Fields§
§version: LeafVer
§script: ScriptBytes
Implementations§
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 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 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§impl PartialOrd for LeafScript
impl PartialOrd for LeafScript
Source§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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.