Struct cashweb::bitcoin::transaction::Script[][src]

pub struct Script(pub Vec<u8, Global>);

Represents a script.

Implementations

impl Script[src]

pub fn is_empty(&self) -> bool[src]

Check whether the script is empty.

pub fn len(&self) -> usize[src]

Length of the script.

pub fn len_varint(&self) -> VarInt[src]

Length of the script as VarInt.

pub fn into_bytes(self) -> Vec<u8, Global>[src]

Convert the script into the underlying bytes.

pub fn as_bytes(&self) -> &[u8]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Converts the script into a byte slice.

pub fn is_op_return(&self) -> bool[src]

Checks whether the script fits the OP_RETURN pattern.

pub fn is_p2pkh(&self) -> bool[src]

Checks whether the scripts the P2PKH pattern.

Trait Implementations

impl Clone for Script[src]

impl Debug for Script[src]

impl Default for Script[src]

impl Encodable for Script[src]

impl Eq for Script[src]

impl From<Vec<u8, Global>> for Script[src]

impl Into<Vec<u8, Global>> for Script[src]

impl PartialEq<Script> for Script[src]

impl StructuralEq for Script[src]

impl StructuralPartialEq for Script[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,