pub enum NamedCLType {
Show 23 variants
Bool,
I32,
I64,
U8,
U32,
U64,
U128,
U256,
U512,
Unit,
String,
Key,
URef,
PublicKey,
Option(Box<NamedCLType>),
List(Box<NamedCLType>),
ByteArray(u32),
Result {
ok: Box<NamedCLType>,
err: Box<NamedCLType>,
},
Map {
key: Box<NamedCLType>,
value: Box<NamedCLType>,
},
Tuple1([Box<NamedCLType>; 1]),
Tuple2([Box<NamedCLType>; 2]),
Tuple3([Box<NamedCLType>; 3]),
Custom(String),
}
Expand description
CLType representation. It is slight extension of the original CLType enum.
Instead of Any
variant, it uses Custom
variant to represent custom
types, that can have name.
Variants§
Bool
I32
I64
U8
U32
U64
U128
U256
U512
Unit
String
Key
URef
PublicKey
Option(Box<NamedCLType>)
List(Box<NamedCLType>)
ByteArray(u32)
Result
Map
Tuple1([Box<NamedCLType>; 1])
Tuple2([Box<NamedCLType>; 2])
Tuple3([Box<NamedCLType>; 3])
Custom(String)
Trait Implementations§
source§impl Clone for NamedCLType
impl Clone for NamedCLType
source§fn clone(&self) -> NamedCLType
fn clone(&self) -> NamedCLType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NamedCLType
impl Debug for NamedCLType
source§impl<'de> Deserialize<'de> for NamedCLType
impl<'de> Deserialize<'de> for NamedCLType
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<NamedCLType> for Type
impl From<NamedCLType> for Type
source§fn from(cl_type: NamedCLType) -> Self
fn from(cl_type: NamedCLType) -> Self
Converts to this type from the input type.
source§impl JsonSchema for NamedCLType
impl JsonSchema for NamedCLType
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl Ord for NamedCLType
impl Ord for NamedCLType
source§fn cmp(&self, other: &NamedCLType) -> Ordering
fn cmp(&self, other: &NamedCLType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for NamedCLType
impl PartialEq for NamedCLType
source§fn eq(&self, other: &NamedCLType) -> bool
fn eq(&self, other: &NamedCLType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for NamedCLType
impl PartialOrd for NamedCLType
source§fn partial_cmp(&self, other: &NamedCLType) -> Option<Ordering>
fn partial_cmp(&self, other: &NamedCLType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for NamedCLType
impl Serialize for NamedCLType
impl Eq for NamedCLType
impl StructuralPartialEq for NamedCLType
Auto Trait Implementations§
impl Freeze for NamedCLType
impl RefUnwindSafe for NamedCLType
impl Send for NamedCLType
impl Sync for NamedCLType
impl Unpin for NamedCLType
impl UnwindSafe for NamedCLType
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
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.