[][src]Struct cashweb_bitcoin::prelude::Script

pub struct Script(pub Vec<u8>);

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>[src]

Convert the script into the underlying bytes.

pub fn as_bytes(&self) -> &[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>> for Script[src]

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

impl PartialEq<Script> for Script[src]

impl StructuralEq for Script[src]

impl StructuralPartialEq for Script[src]

Auto Trait Implementations

impl RefUnwindSafe for Script

impl Send for Script

impl Sync for Script

impl Unpin for Script

impl UnwindSafe for Script

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<T> From<T> for T[src]

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

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>,