[][src]Enum clarity::abi::Token

pub enum Token {
    Uint(Uint256),
    Address(Address),
    Bool(bool),
    String(String),
    Bytes(Vec<u8>),
    UnboundedBytes(Vec<u8>),
    Dynamic(Vec<Token>),
}

A token represents a value of parameter of the contract call.

For each supported type there is separate entry that later is helpful to determine actual byte representation.

Variants

Uint(Uint256)

Unsigned type with value already encoded.

Address(Address)

Ethereum Address

Bool(bool)

A boolean logic

String(String)

Represents a string

Bytes(Vec<u8>)

Fixed size array of bytes

UnboundedBytes(Vec<u8>)

This is a dynamic array of bytes that reflects dynamic "bytes" type in Solidity

Dynamic(Vec<Token>)

Dynamic array with supported values of supported types already converted

Methods

impl Token
[src]

pub fn serialize(&self) -> SerializedToken
[src]

Serializes a token into a SerializedToken

Trait Implementations

impl From<u8> for Token
[src]

impl From<u16> for Token
[src]

impl From<u32> for Token
[src]

impl From<u64> for Token
[src]

impl From<bool> for Token
[src]

impl From<Vec<u8>> for Token
[src]

impl From<Vec<u32>> for Token
[src]

impl From<Address> for Token
[src]

impl<'a> From<&'a str> for Token
[src]

impl From<Uint256> for Token
[src]

impl Debug for Token
[src]

Auto Trait Implementations

impl Send for Token

impl Sync for Token

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Same for T

type Output = T

Should always be Self