[][src]Enum casperlabs_types::CLType

pub enum CLType {
    Bool,
    I32,
    I64,
    U8,
    U32,
    U64,
    U128,
    U256,
    U512,
    Unit,
    String,
    Key,
    URef,
    Option(Box<CLType>),
    List(Box<CLType>),
    FixedList(Box<CLType>, u32),
    Result {
        ok: Box<CLType>,
        err: Box<CLType>,
    },
    Map {
        key: Box<CLType>,
        value: Box<CLType>,
    },
    Tuple1([Box<CLType>; 1]),
    Tuple2([Box<CLType>; 2]),
    Tuple3([Box<CLType>; 3]),
    Any,
}

CasperLabs types, i.e. types which can be stored and manipulated by smart contracts.

Provides a description of the underlying data type of a CLValue.

Variants

Bool

bool primitive.

I32

i32 primitive.

I64

i64 primitive.

U8

u8 primitive.

U32

u32 primitive.

U64

u64 primitive.

U128

U128 large unsigned integer type.

U256

U256 large unsigned integer type.

U512

U512 large unsigned integer type.

Unit

() primitive.

String

String primitive.

Key

Key system type.

URef

URef system type.

Option(Box<CLType>)

Option of a CLType.

List(Box<CLType>)

Variable-length list of a single CLType (comparable to a Vec).

FixedList(Box<CLType>, u32)

Fixed-length list of a single CLType (comparable to a Rust array).

Result

Result with Ok and Err variants of CLTypes.

Fields of Result

ok: Box<CLType>err: Box<CLType>
Map

Map with keys of a single CLType and values of a single CLType.

Fields of Map

key: Box<CLType>value: Box<CLType>
Tuple1([Box<CLType>; 1])

1-ary tuple of a CLType.

Tuple2([Box<CLType>; 2])

2-ary tuple of CLTypes.

Tuple3([Box<CLType>; 3])

3-ary tuple of CLTypes.

Any

Unspecified type.

Methods

impl CLType[src]

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

The len() of the Vec<u8> resulting from self.to_bytes().

Trait Implementations

impl Clone for CLType[src]

impl Debug for CLType[src]

impl Eq for CLType[src]

impl FromBytes for CLType[src]

impl PartialEq<CLType> for CLType[src]

impl StructuralEq for CLType[src]

impl StructuralPartialEq for CLType[src]

Auto Trait Implementations

impl RefUnwindSafe for CLType

impl Send for CLType

impl Sync for CLType

impl Unpin for CLType

impl UnwindSafe for CLType

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