Enum casper_types::CLType
source · pub enum CLType {
Show 23 variants
Bool,
I32,
I64,
U8,
U32,
U64,
U128,
U256,
U512,
Unit,
String,
Key,
URef,
PublicKey,
Option(Box<CLType>),
List(Box<CLType>),
ByteArray(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,
}
Expand description
Casper 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.
PublicKey
PublicKey
system type.
Option(Box<CLType>)
Option
of a CLType
.
List(Box<CLType>)
Variable-length list of a single CLType
(comparable to a Vec
).
ByteArray(u32)
Fixed-length list of a single CLType
(comparable to a Rust array).
Result
Result
with Ok
and Err
variants of CLType
s.
Map
Map with keys of a single CLType
and values of a single CLType
.
Tuple1([Box<CLType>; 1])
1-ary tuple of a CLType
.
Tuple2([Box<CLType>; 2])
2-ary tuple of CLType
s.
Tuple3([Box<CLType>; 3])
3-ary tuple of CLType
s.
Any
Unspecified type.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for CLType
impl<'de> Deserialize<'de> for CLType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Ord for CLType
impl Ord for CLType
source§impl PartialOrd for CLType
impl PartialOrd for CLType
impl Eq for CLType
impl StructuralPartialEq for CLType
Auto Trait Implementations§
impl Freeze for CLType
impl RefUnwindSafe for CLType
impl Send for CLType
impl Sync for CLType
impl Unpin for CLType
impl UnwindSafe for CLType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)