pub enum BaseValue {
Bool(bool),
Int(BigInt),
Address(AccountAddress),
Signer(AccountAddress),
Vector(Vec<BaseValue>),
Struct(Vec<BaseValue>),
}
Variants
Bool(bool)
Int(BigInt)
Address(AccountAddress)
Signer(AccountAddress)
Vector(Vec<BaseValue>)
Struct(Vec<BaseValue>)
Implementations
sourceimpl BaseValue
impl BaseValue
pub fn mk_bool(v: bool) -> Self
pub fn mk_u8(v: u8) -> Self
pub fn mk_u64(v: u64) -> Self
pub fn mk_u128(v: u128) -> Self
pub fn mk_num(v: BigInt) -> Self
pub fn mk_address(v: AccountAddress) -> Self
pub fn mk_signer(v: AccountAddress) -> Self
pub fn mk_vector(v: Vec<BaseValue>) -> Self
pub fn mk_struct(v: Vec<BaseValue>) -> Self
pub fn into_bool(self) -> bool
pub fn into_u8(self) -> u8
pub fn into_u64(self) -> u64
pub fn into_u128(self) -> u128
pub fn into_num(self) -> BigInt
pub fn into_int(self) -> BigInt
pub fn into_address(self) -> AccountAddress
pub fn into_signer(self) -> AccountAddress
pub fn into_vector(self) -> Vec<BaseValue>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn into_struct(self) -> Vec<BaseValue>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Trait Implementations
sourceimpl Ord for BaseValue
impl Ord for BaseValue
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<BaseValue> for BaseValue
impl PartialEq<BaseValue> for BaseValue
sourceimpl PartialOrd<BaseValue> for BaseValue
impl PartialOrd<BaseValue> for BaseValue
sourcefn partial_cmp(&self, other: &BaseValue) -> Option<Ordering>
fn partial_cmp(&self, other: &BaseValue) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl Eq for BaseValue
impl StructuralEq for BaseValue
impl StructuralPartialEq for BaseValue
Auto Trait Implementations
impl RefUnwindSafe for BaseValue
impl Send for BaseValue
impl Sync for BaseValue
impl Unpin for BaseValue
impl UnwindSafe for BaseValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.