[][src]Enum tari_crypto::script::StackItem

pub enum StackItem {
    Number(i64),
    Hash(HashValue),
    Commitment(PedersenCommitment),
    PublicKey(RistrettoPublicKey),
    Signature(RistrettoSchnorr),
}

Variants

Number(i64)
Hash(HashValue)
Commitment(PedersenCommitment)
Signature(RistrettoSchnorr)

Implementations

impl StackItem[src]

pub fn to_bytes<'a>(&self, array: &'a mut Vec<u8>) -> &'a [u8][src]

Convert an input item into its binary representation and append it to the array. The function returns the byte slice that matches the item as a convenience

pub fn read_next(bytes: &[u8]) -> Option<(Self, &[u8])>[src]

Take a byte slice and read the next stack item from it, including any associated data. read_next returns a tuple of the deserialised item, and an updated slice that has the Opcode and data removed.

Trait Implementations

impl Clone for StackItem[src]

impl Debug for StackItem[src]

impl Eq for StackItem[src]

impl From<HomomorphicCommitment<RistrettoPublicKey>> for StackItem[src]

impl From<RistrettoPublicKey> for StackItem[src]

impl From<SchnorrSignature<RistrettoPublicKey, RistrettoSecretKey>> for StackItem[src]

impl From<i64> for StackItem[src]

impl PartialEq<StackItem> for StackItem[src]

impl StructuralEq for StackItem[src]

impl StructuralPartialEq for StackItem[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<T, U> Cast<U> for T where
    U: FromCast<T>, 

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

impl<T> FromBits<T> for T

impl<T> FromCast<T> for T

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

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

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