pub enum Value {
}Expand description
A runtime value tagged by its ParamType.
Mirrors the ParamType variant set 1-to-1. Used as the
untyped argument / return type on the dynamic super::Contract
surface; typed wrappers generated by the pyde_abi! macro
translate to/from concrete Rust types.
Variants§
U8(u8)
u8 value.
U16(u16)
u16 value.
U32(u32)
u32 value.
U64(u64)
u64 value.
U128(u128)
u128 value.
I8(i8)
i8 value.
I16(i16)
i16 value.
I32(i32)
i32 value.
I64(i64)
i64 value.
I128(i128)
i128 value.
Bool(bool)
Boolean.
Address(Address)
32-byte Pyde address.
Bytes(Vec<u8>)
Variable-length opaque bytes.
String(String)
UTF-8 string.
FixedBytes(Vec<u8>)
Fixed-size byte array.
Vec(Vec<Value>)
Homogeneous list of values.
Map(Vec<(Value, Value)>)
Key-value pairs (in deterministic order — see Value::map).
Option(Option<Box<Value>>)
Optional value.
Custom(Vec<u8>)
Opaque Borsh bytes for a ParamType::Custom-tagged value.
The SDK doesn’t decode custom types; the bytes are produced
(and consumed) by the caller’s typed wrapper.
Implementations§
Trait Implementations§
impl Eq for Value
Source§impl Ord for Value
impl Ord for Value
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Value
impl PartialOrd for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more