Struct soroban_sdk::RawVal

pub struct RawVal(_);
Expand description

Raw value of the Soroban smart contract platform that types can be converted to and from for storing, or passing between contracts.

A 64-bit value encoding a bit-packed disjoint union between several different types (numbers, booleans, symbols, object handles, etc.)

RawVals divide up the space of 64 bits according to a 2-level tagging scheme. The first tag is a bit in the least-significant position, indicating whether the RawVal is a plain “u63” 63-bit unsigned integer, or some more-structured value with a second-level tag in the next most significant 3 bits. The 63-bit unsigned integer case can also be thought of as handling the complete range of non-negative signed 64-bit integers.

The remaining 3 bit tags are assigned to cases enumerated in [Tag], of which 7 are defined and one is currently reserved.

Schematically, the bit-assignment for RawVal looks like this:

   0x_NNNN_NNNN_NNNN_NNNX  - u63, for any even X
   0x_0000_000N_NNNN_NNN1  - u32
   0x_0000_000N_NNNN_NNN3  - i32
   0x_NNNN_NNNN_NNNN_NNN5  - static: void, true, false, ...
   0x_IIII_IIII_TTTT_TTT7  - object: 32-bit index I, 28-bit type code T
   0x_NNNN_NNNN_NNNN_NNN9  - symbol: up to 10 6-bit identifier characters
   0x_NNNN_NNNN_NNNN_NNNb  - bitset: up to 60 bits
   0x_CCCC_CCCC_TTTT_TTTd  - status: 32-bit code C, 28-bit type code T
   0x_NNNN_NNNN_NNNN_NNNf  - reserved

Implementations§

§

impl RawVal

pub const fn get_payload(self) -> u64

pub const fn from_payload(x: u64) -> RawVal

pub const fn shallow_eq(&self, other: &RawVal) -> bool

pub const fn is_u63(self) -> bool

pub const unsafe fn unchecked_as_u63(self) -> i64

pub const unsafe fn unchecked_from_u63(i: i64) -> RawVal

pub const fn get_tag(self) -> Tag

pub fn is<T>(self) -> boolwhere
T: RawValConvertible,

pub const fn from_void() -> RawVal

pub const fn from_bool(b: bool) -> RawVal

pub const fn from_other_static(st: ScStatic) -> RawVal

pub const fn from_u32(u: u32) -> RawVal

pub const fn from_i32(i: i32) -> RawVal

pub const fn is_i32_zero(self) -> bool

pub const fn is_u32_zero(self) -> bool

pub const fn is_void(self) -> bool

pub const fn is_true(self) -> bool

pub const fn is_false(self) -> bool

§

impl RawVal

pub const I32_ZERO: RawVal = RawVal::from_i32(0)

pub const I32_POSITIVE_ONE: RawVal = RawVal::from_i32(1)

pub const I32_NEGATIVE_ONE: RawVal = RawVal::from_i32(-1)

pub const I32_MIN: RawVal = RawVal::from_i32(i32::MIN)

pub const I32_MAX: RawVal = RawVal::from_i32(i32::MAX)

pub const U32_ZERO: RawVal = RawVal::from_u32(0)

pub const U32_ONE: RawVal = RawVal::from_u32(1)

pub const U32_MIN: RawVal = RawVal::from_u32(u32::MIN)

pub const U32_MAX: RawVal = RawVal::from_u32(u32::MAX)

pub const VOID: RawVal = RawVal::from_other_static(ScStatic::Void)

pub const TRUE: RawVal = RawVal::from_bool(true)

pub const FALSE: RawVal = RawVal::from_bool(false)

Trait Implementations§

§

impl AsMut<RawVal> for BitSet

§

fn as_mut(&mut self) -> &mut RawVal

Converts this type into a mutable reference of the (usually inferred) input type.
§

impl AsMut<RawVal> for Object

§

fn as_mut(&mut self) -> &mut RawVal

Converts this type into a mutable reference of the (usually inferred) input type.
§

impl AsMut<RawVal> for RawVal

§

fn as_mut(&mut self) -> &mut RawVal

Converts this type into a mutable reference of the (usually inferred) input type.
§

impl AsMut<RawVal> for Static

§

fn as_mut(&mut self) -> &mut RawVal

Converts this type into a mutable reference of the (usually inferred) input type.
§

impl AsMut<RawVal> for Status

§

fn as_mut(&mut self) -> &mut RawVal

Converts this type into a mutable reference of the (usually inferred) input type.
§

impl AsMut<RawVal> for Symbol

§

fn as_mut(&mut self) -> &mut RawVal

Converts this type into a mutable reference of the (usually inferred) input type.
§

impl AsRef<RawVal> for BitSet

§

fn as_ref(&self) -> &RawVal

Converts this type into a shared reference of the (usually inferred) input type.
§

impl AsRef<RawVal> for Object

§

fn as_ref(&self) -> &RawVal

Converts this type into a shared reference of the (usually inferred) input type.
§

impl AsRef<RawVal> for RawVal

§

fn as_ref(&self) -> &RawVal

Converts this type into a shared reference of the (usually inferred) input type.
§

impl AsRef<RawVal> for Static

§

fn as_ref(&self) -> &RawVal

Converts this type into a shared reference of the (usually inferred) input type.
§

impl AsRef<RawVal> for Status

§

fn as_ref(&self) -> &RawVal

Converts this type into a shared reference of the (usually inferred) input type.
§

impl AsRef<RawVal> for Symbol

§

fn as_ref(&self) -> &RawVal

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Clone for RawVal

§

fn clone(&self) -> RawVal

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for RawVal

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for RawVal

§

fn default() -> RawVal

Returns the “default value” for a type. Read more
§

impl From<&()> for RawVal

§

fn from(_: &()) -> RawVal

Converts to this type from the input type.
§

impl From<&ScStatus> for RawVal

§

fn from(st: &ScStatus) -> RawVal

Converts to this type from the input type.
§

impl From<&i32> for RawVal

§

fn from(i: &i32) -> RawVal

Converts to this type from the input type.
§

impl From<&u32> for RawVal

§

fn from(u: &u32) -> RawVal

Converts to this type from the input type.
§

impl From<()> for RawVal

§

fn from(_: ()) -> RawVal

Converts to this type from the input type.
§

impl From<BitSet> for RawVal

§

fn from(b: BitSet) -> RawVal

Converts to this type from the input type.
source§

impl From<Bytes> for RawVal

source§

fn from(v: Bytes) -> Self

Converts to this type from the input type.
source§

impl<const N: usize> From<BytesN<N>> for RawVal

source§

fn from(v: BytesN<N>) -> Self

Converts to this type from the input type.
source§

impl<K, V> From<Map<K, V>> for RawValwhere
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,

source§

fn from(m: Map<K, V>) -> Self

Converts to this type from the input type.
§

impl From<Object> for RawVal

§

fn from(b: Object) -> RawVal

Converts to this type from the input type.
source§

impl From<RawVal> for DebugArg

source§

fn from(rv: RawVal) -> DebugArg

Converts to this type from the input type.
§

impl From<ScStatus> for RawVal

§

fn from(st: ScStatus) -> RawVal

Converts to this type from the input type.
§

impl From<Static> for RawVal

§

fn from(b: Static) -> RawVal

Converts to this type from the input type.
§

impl From<Status> for RawVal

§

fn from(b: Status) -> RawVal

Converts to this type from the input type.
§

impl From<Symbol> for RawVal

§

fn from(b: Symbol) -> RawVal

Converts to this type from the input type.
source§

impl<T> From<Vec<T>> for RawValwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,

source§

fn from(v: Vec<T>) -> Self

Converts to this type from the input type.
§

impl From<bool> for RawVal

§

fn from(b: bool) -> RawVal

Converts to this type from the input type.
§

impl From<i32> for RawVal

§

fn from(i: i32) -> RawVal

Converts to this type from the input type.
§

impl From<u32> for RawVal

§

fn from(u: u32) -> RawVal

Converts to this type from the input type.
§

impl FromValue for RawVal

§

fn from_value(val: Value) -> Option<RawVal>

Create a value of type Self from a given Value. Read more
§

impl TryFrom<&RawVal> for BitSet

§

type Error = ConversionError

The type returned in the event of a conversion error.
§

fn try_from(v: &RawVal) -> Result<BitSet, <BitSet as TryFrom<&RawVal>>::Error>

Performs the conversion.
§

impl TryFrom<&RawVal> for Object

§

type Error = ConversionError

The type returned in the event of a conversion error.
§

fn try_from(v: &RawVal) -> Result<Object, <Object as TryFrom<&RawVal>>::Error>

Performs the conversion.
§

impl TryFrom<&RawVal> for Static

§

type Error = ConversionError

The type returned in the event of a conversion error.
§

fn try_from(v: &RawVal) -> Result<Static, <Static as TryFrom<&RawVal>>::Error>

Performs the conversion.
§

impl TryFrom<&RawVal> for Status

§

type Error = ConversionError

The type returned in the event of a conversion error.
§

fn try_from(v: &RawVal) -> Result<Status, <Status as TryFrom<&RawVal>>::Error>

Performs the conversion.
§

impl TryFrom<&RawVal> for Symbol

§

type Error = ConversionError

The type returned in the event of a conversion error.
§

fn try_from(v: &RawVal) -> Result<Symbol, <Symbol as TryFrom<&RawVal>>::Error>

Performs the conversion.
§

impl TryFrom<RawVal> for BitSet

§

type Error = ConversionError

The type returned in the event of a conversion error.
§

fn try_from(v: RawVal) -> Result<BitSet, <BitSet as TryFrom<RawVal>>::Error>

Performs the conversion.
§

impl TryFrom<RawVal> for Object

§

type Error = ConversionError

The type returned in the event of a conversion error.
§

fn try_from(v: RawVal) -> Result<Object, <Object as TryFrom<RawVal>>::Error>

Performs the conversion.
§

impl TryFrom<RawVal> for Static

§

type Error = ConversionError

The type returned in the event of a conversion error.
§

fn try_from(v: RawVal) -> Result<Static, <Static as TryFrom<RawVal>>::Error>

Performs the conversion.
§

impl TryFrom<RawVal> for Status

§

type Error = ConversionError

The type returned in the event of a conversion error.
§

fn try_from(v: RawVal) -> Result<Status, <Status as TryFrom<RawVal>>::Error>

Performs the conversion.
§

impl TryFrom<RawVal> for Symbol

§

type Error = ConversionError

The type returned in the event of a conversion error.
§

fn try_from(v: RawVal) -> Result<Symbol, <Symbol as TryFrom<RawVal>>::Error>

Performs the conversion.
§

impl<E> TryFromVal<E, &[u8]> for RawValwhere
E: Env,

§

type Error = Status

§

fn try_from_val(
env: &E,
v: &&[u8]
) -> Result<RawVal, <RawVal as TryFromVal<E, &[u8]>>::Error>

§

impl<E> TryFromVal<E, &str> for RawValwhere
E: Env,

§

impl<E, const N: usize> TryFromVal<E, [u8; N]> for RawValwhere
E: Env,

§

type Error = Status

§

fn try_from_val(
env: &E,
v: &[u8; N]
) -> Result<RawVal, <RawVal as TryFromVal<E, [u8; N]>>::Error>

§

impl<E> TryFromVal<E, ()> for RawValwhere
E: Env,

§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> TryFromVal<E, (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,
T1: TryIntoVal<E, RawVal>,
T2: TryIntoVal<E, RawVal>,
T3: TryIntoVal<E, RawVal>,
T4: TryIntoVal<E, RawVal>,
T5: TryIntoVal<E, RawVal>,
T6: TryIntoVal<E, RawVal>,
T7: TryIntoVal<E, RawVal>,
T8: TryIntoVal<E, RawVal>,
T9: TryIntoVal<E, RawVal>,
T10: TryIntoVal<E, RawVal>,
T11: TryIntoVal<E, RawVal>,
T12: TryIntoVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> TryFromVal<E, (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,
T1: TryIntoVal<E, RawVal>,
T2: TryIntoVal<E, RawVal>,
T3: TryIntoVal<E, RawVal>,
T4: TryIntoVal<E, RawVal>,
T5: TryIntoVal<E, RawVal>,
T6: TryIntoVal<E, RawVal>,
T7: TryIntoVal<E, RawVal>,
T8: TryIntoVal<E, RawVal>,
T9: TryIntoVal<E, RawVal>,
T10: TryIntoVal<E, RawVal>,
T11: TryIntoVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> TryFromVal<E, (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,
T1: TryIntoVal<E, RawVal>,
T2: TryIntoVal<E, RawVal>,
T3: TryIntoVal<E, RawVal>,
T4: TryIntoVal<E, RawVal>,
T5: TryIntoVal<E, RawVal>,
T6: TryIntoVal<E, RawVal>,
T7: TryIntoVal<E, RawVal>,
T8: TryIntoVal<E, RawVal>,
T9: TryIntoVal<E, RawVal>,
T10: TryIntoVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> TryFromVal<E, (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,
T1: TryIntoVal<E, RawVal>,
T2: TryIntoVal<E, RawVal>,
T3: TryIntoVal<E, RawVal>,
T4: TryIntoVal<E, RawVal>,
T5: TryIntoVal<E, RawVal>,
T6: TryIntoVal<E, RawVal>,
T7: TryIntoVal<E, RawVal>,
T8: TryIntoVal<E, RawVal>,
T9: TryIntoVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8> TryFromVal<E, (T0, T1, T2, T3, T4, T5, T6, T7, T8)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,
T1: TryIntoVal<E, RawVal>,
T2: TryIntoVal<E, RawVal>,
T3: TryIntoVal<E, RawVal>,
T4: TryIntoVal<E, RawVal>,
T5: TryIntoVal<E, RawVal>,
T6: TryIntoVal<E, RawVal>,
T7: TryIntoVal<E, RawVal>,
T8: TryIntoVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7> TryFromVal<E, (T0, T1, T2, T3, T4, T5, T6, T7)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,
T1: TryIntoVal<E, RawVal>,
T2: TryIntoVal<E, RawVal>,
T3: TryIntoVal<E, RawVal>,
T4: TryIntoVal<E, RawVal>,
T5: TryIntoVal<E, RawVal>,
T6: TryIntoVal<E, RawVal>,
T7: TryIntoVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5, T6> TryFromVal<E, (T0, T1, T2, T3, T4, T5, T6)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,
T1: TryIntoVal<E, RawVal>,
T2: TryIntoVal<E, RawVal>,
T3: TryIntoVal<E, RawVal>,
T4: TryIntoVal<E, RawVal>,
T5: TryIntoVal<E, RawVal>,
T6: TryIntoVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5> TryFromVal<E, (T0, T1, T2, T3, T4, T5)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,
T1: TryIntoVal<E, RawVal>,
T2: TryIntoVal<E, RawVal>,
T3: TryIntoVal<E, RawVal>,
T4: TryIntoVal<E, RawVal>,
T5: TryIntoVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4> TryFromVal<E, (T0, T1, T2, T3, T4)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,
T1: TryIntoVal<E, RawVal>,
T2: TryIntoVal<E, RawVal>,
T3: TryIntoVal<E, RawVal>,
T4: TryIntoVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3> TryFromVal<E, (T0, T1, T2, T3)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,
T1: TryIntoVal<E, RawVal>,
T2: TryIntoVal<E, RawVal>,
T3: TryIntoVal<E, RawVal>,

§

impl<E, T0, T1, T2> TryFromVal<E, (T0, T1, T2)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,
T1: TryIntoVal<E, RawVal>,
T2: TryIntoVal<E, RawVal>,

§

impl<E, T0, T1> TryFromVal<E, (T0, T1)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,
T1: TryIntoVal<E, RawVal>,

§

impl<E, T0> TryFromVal<E, (T0,)> for RawValwhere
E: Env,
T0: TryIntoVal<E, RawVal>,

§

impl<E> TryFromVal<E, BitSet> for RawValwhere
E: Env,

§

type Error = ConversionError

§

fn try_from_val(
_env: &E,
val: &BitSet
) -> Result<RawVal, <RawVal as TryFromVal<E, BitSet>>::Error>

§

impl<E> TryFromVal<E, Object> for RawValwhere
E: Env,

§

type Error = ConversionError

§

fn try_from_val(
_env: &E,
val: &Object
) -> Result<RawVal, <RawVal as TryFromVal<E, Object>>::Error>

§

impl<E, T> TryFromVal<E, Option<T>> for RawValwhere
E: Env,
T: TryIntoVal<E, RawVal>,

§

type Error = <T as TryIntoVal<E, RawVal>>::Error

§

fn try_from_val(
env: &E,
v: &Option<T>
) -> Result<RawVal, <RawVal as TryFromVal<E, Option<T>>>::Error>

§

impl<E, const N: usize> TryFromVal<E, RawVal> for [u8; N]where
E: Env,

§

type Error = Status

§

fn try_from_val(
env: &E,
val: &RawVal
) -> Result<[u8; N], <[u8; N] as TryFromVal<E, RawVal>>::Error>

§

impl<E> TryFromVal<E, RawVal> for ()where
E: Env,

§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> TryFromVal<E, RawVal> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)where
E: Env,
T0: TryFromVal<E, RawVal>,
T1: TryFromVal<E, RawVal>,
T2: TryFromVal<E, RawVal>,
T3: TryFromVal<E, RawVal>,
T4: TryFromVal<E, RawVal>,
T5: TryFromVal<E, RawVal>,
T6: TryFromVal<E, RawVal>,
T7: TryFromVal<E, RawVal>,
T8: TryFromVal<E, RawVal>,
T9: TryFromVal<E, RawVal>,
T10: TryFromVal<E, RawVal>,
T11: TryFromVal<E, RawVal>,
T12: TryFromVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> TryFromVal<E, RawVal> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
E: Env,
T0: TryFromVal<E, RawVal>,
T1: TryFromVal<E, RawVal>,
T2: TryFromVal<E, RawVal>,
T3: TryFromVal<E, RawVal>,
T4: TryFromVal<E, RawVal>,
T5: TryFromVal<E, RawVal>,
T6: TryFromVal<E, RawVal>,
T7: TryFromVal<E, RawVal>,
T8: TryFromVal<E, RawVal>,
T9: TryFromVal<E, RawVal>,
T10: TryFromVal<E, RawVal>,
T11: TryFromVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> TryFromVal<E, RawVal> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
E: Env,
T0: TryFromVal<E, RawVal>,
T1: TryFromVal<E, RawVal>,
T2: TryFromVal<E, RawVal>,
T3: TryFromVal<E, RawVal>,
T4: TryFromVal<E, RawVal>,
T5: TryFromVal<E, RawVal>,
T6: TryFromVal<E, RawVal>,
T7: TryFromVal<E, RawVal>,
T8: TryFromVal<E, RawVal>,
T9: TryFromVal<E, RawVal>,
T10: TryFromVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> TryFromVal<E, RawVal> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
E: Env,
T0: TryFromVal<E, RawVal>,
T1: TryFromVal<E, RawVal>,
T2: TryFromVal<E, RawVal>,
T3: TryFromVal<E, RawVal>,
T4: TryFromVal<E, RawVal>,
T5: TryFromVal<E, RawVal>,
T6: TryFromVal<E, RawVal>,
T7: TryFromVal<E, RawVal>,
T8: TryFromVal<E, RawVal>,
T9: TryFromVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8> TryFromVal<E, RawVal> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)where
E: Env,
T0: TryFromVal<E, RawVal>,
T1: TryFromVal<E, RawVal>,
T2: TryFromVal<E, RawVal>,
T3: TryFromVal<E, RawVal>,
T4: TryFromVal<E, RawVal>,
T5: TryFromVal<E, RawVal>,
T6: TryFromVal<E, RawVal>,
T7: TryFromVal<E, RawVal>,
T8: TryFromVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5, T6, T7> TryFromVal<E, RawVal> for (T0, T1, T2, T3, T4, T5, T6, T7)where
E: Env,
T0: TryFromVal<E, RawVal>,
T1: TryFromVal<E, RawVal>,
T2: TryFromVal<E, RawVal>,
T3: TryFromVal<E, RawVal>,
T4: TryFromVal<E, RawVal>,
T5: TryFromVal<E, RawVal>,
T6: TryFromVal<E, RawVal>,
T7: TryFromVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5, T6> TryFromVal<E, RawVal> for (T0, T1, T2, T3, T4, T5, T6)where
E: Env,
T0: TryFromVal<E, RawVal>,
T1: TryFromVal<E, RawVal>,
T2: TryFromVal<E, RawVal>,
T3: TryFromVal<E, RawVal>,
T4: TryFromVal<E, RawVal>,
T5: TryFromVal<E, RawVal>,
T6: TryFromVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4, T5> TryFromVal<E, RawVal> for (T0, T1, T2, T3, T4, T5)where
E: Env,
T0: TryFromVal<E, RawVal>,
T1: TryFromVal<E, RawVal>,
T2: TryFromVal<E, RawVal>,
T3: TryFromVal<E, RawVal>,
T4: TryFromVal<E, RawVal>,
T5: TryFromVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3, T4> TryFromVal<E, RawVal> for (T0, T1, T2, T3, T4)where
E: Env,
T0: TryFromVal<E, RawVal>,
T1: TryFromVal<E, RawVal>,
T2: TryFromVal<E, RawVal>,
T3: TryFromVal<E, RawVal>,
T4: TryFromVal<E, RawVal>,

§

impl<E, T0, T1, T2, T3> TryFromVal<E, RawVal> for (T0, T1, T2, T3)where
E: Env,
T0: TryFromVal<E, RawVal>,
T1: TryFromVal<E, RawVal>,
T2: TryFromVal<E, RawVal>,
T3: TryFromVal<E, RawVal>,

§

impl<E, T0, T1, T2> TryFromVal<E, RawVal> for (T0, T1, T2)where
E: Env,
T0: TryFromVal<E, RawVal>,
T1: TryFromVal<E, RawVal>,
T2: TryFromVal<E, RawVal>,

§

impl<E, T0, T1> TryFromVal<E, RawVal> for (T0, T1)where
E: Env,
T0: TryFromVal<E, RawVal>,
T1: TryFromVal<E, RawVal>,

§

impl<E, T0> TryFromVal<E, RawVal> for (T0,)where
E: Env,
T0: TryFromVal<E, RawVal>,

§

impl<E> TryFromVal<E, RawVal> for BitSetwhere
E: Env,

§

type Error = ConversionError

§

fn try_from_val(
_env: &E,
val: &RawVal
) -> Result<BitSet, <BitSet as TryFromVal<E, RawVal>>::Error>

§

impl<E> TryFromVal<E, RawVal> for Objectwhere
E: Env,

§

type Error = ConversionError

§

fn try_from_val(
_env: &E,
val: &RawVal
) -> Result<Object, <Object as TryFromVal<E, RawVal>>::Error>

§

impl<E, T> TryFromVal<E, RawVal> for Option<T>where
E: Env,
T: TryFromVal<E, RawVal>,

§

type Error = <T as TryFromVal<E, RawVal>>::Error

§

fn try_from_val(
env: &E,
val: &RawVal
) -> Result<Option<T>, <Option<T> as TryFromVal<E, RawVal>>::Error>

§

impl<E> TryFromVal<E, RawVal> for RawValwhere
E: Env,

§

impl<E, T, R> TryFromVal<E, RawVal> for Result<T, R>where
E: Env,
T: TryFromVal<E, RawVal>,
R: TryFrom<Status>,

§

type Error = ConversionError

§

fn try_from_val(
env: &E,
val: &RawVal
) -> Result<Result<T, R>, <Result<T, R> as TryFromVal<E, RawVal>>::Error>

§

impl<E> TryFromVal<E, RawVal> for ScValwhere
E: Env,
ScObject: TryFromVal<E, Object>,

§

type Error = ConversionError

§

fn try_from_val(
env: &E,
val: &RawVal
) -> Result<ScVal, <ScVal as TryFromVal<E, RawVal>>::Error>

§

impl<E> TryFromVal<E, RawVal> for Staticwhere
E: Env,

§

type Error = ConversionError

§

fn try_from_val(
_env: &E,
val: &RawVal
) -> Result<Static, <Static as TryFromVal<E, RawVal>>::Error>

§

impl<E> TryFromVal<E, RawVal> for Statuswhere
E: Env,

§

type Error = ConversionError

§

fn try_from_val(
_env: &E,
val: &RawVal
) -> Result<Status, <Status as TryFromVal<E, RawVal>>::Error>

§

impl<E> TryFromVal<E, RawVal> for Stringwhere
E: Env,

§

impl<E> TryFromVal<E, RawVal> for Symbolwhere
E: Env,

§

impl<E> TryFromVal<E, RawVal> for Vec<u8, Global>where
E: Env,

§

type Error = Status

§

fn try_from_val(
env: &E,
val: &RawVal
) -> Result<Vec<u8, Global>, <Vec<u8, Global> as TryFromVal<E, RawVal>>::Error>

§

impl<E> TryFromVal<E, RawVal> for boolwhere
E: Env,

§

impl<E> TryFromVal<E, RawVal> for i128where
E: Env,

§

impl<E> TryFromVal<E, RawVal> for i32where
E: Env,

§

impl<E> TryFromVal<E, RawVal> for i64where
E: Env,

§

impl<E> TryFromVal<E, RawVal> for u128where
E: Env,

§

impl<E> TryFromVal<E, RawVal> for u32where
E: Env,

§

impl<E> TryFromVal<E, RawVal> for u64where
E: Env,

§

impl<E, T, R> TryFromVal<E, Result<T, R>> for RawValwhere
E: Env,
RawVal: TryFromVal<E, T>,
Status: for<'a> TryFrom<&'a R>,

§

type Error = ConversionError

§

fn try_from_val(
env: &E,
v: &Result<T, R>
) -> Result<RawVal, <RawVal as TryFromVal<E, Result<T, R>>>::Error>

§

impl<E> TryFromVal<E, ScVal> for RawValwhere
E: Env,
Object: TryFromVal<E, ScObject>,

§

type Error = ConversionError

§

fn try_from_val(
env: &E,
val: &ScVal
) -> Result<RawVal, <RawVal as TryFromVal<E, ScVal>>::Error>

§

impl<E> TryFromVal<E, Static> for RawValwhere
E: Env,

§

type Error = ConversionError

§

fn try_from_val(
_env: &E,
val: &Static
) -> Result<RawVal, <RawVal as TryFromVal<E, Static>>::Error>

§

impl<E> TryFromVal<E, Status> for RawValwhere
E: Env,

§

type Error = ConversionError

§

fn try_from_val(
_env: &E,
val: &Status
) -> Result<RawVal, <RawVal as TryFromVal<E, Status>>::Error>

§

impl<'a, E> TryFromVal<E, String> for RawValwhere
E: Env,

§

impl<E> TryFromVal<E, Symbol> for RawValwhere
E: Env,

§

impl<E> TryFromVal<E, Vec<u8, Global>> for RawValwhere
E: Env,

§

type Error = Status

§

fn try_from_val(
env: &E,
v: &Vec<u8, Global>
) -> Result<RawVal, <RawVal as TryFromVal<E, Vec<u8, Global>>>::Error>

§

impl<E> TryFromVal<E, bool> for RawValwhere
E: Env,

§

impl<E> TryFromVal<E, i128> for RawValwhere
E: Env,

§

impl<E> TryFromVal<E, i32> for RawValwhere
E: Env,

§

impl<E> TryFromVal<E, i64> for RawValwhere
E: Env,

§

impl<E> TryFromVal<E, u128> for RawValwhere
E: Env,

§

impl<E> TryFromVal<E, u32> for RawValwhere
E: Env,

§

impl<E> TryFromVal<E, u64> for RawValwhere
E: Env,

source§

impl TryFromVal<Env, &Address> for RawVal

§

type Error = ConversionError

source§

fn try_from_val(_env: &Env, v: &&Address) -> Result<Self, Self::Error>

source§

impl TryFromVal<Env, Address> for RawVal

§

type Error = ConversionError

source§

fn try_from_val(_env: &Env, v: &Address) -> Result<Self, Self::Error>

source§

impl TryFromVal<Env, Bytes> for RawVal

§

type Error = ConversionError

source§

fn try_from_val(_env: &Env, v: &Bytes) -> Result<Self, Self::Error>

source§

impl<const N: usize> TryFromVal<Env, BytesN<N>> for RawVal

§

type Error = ConversionError

source§

fn try_from_val(_env: &Env, v: &BytesN<N>) -> Result<Self, Self::Error>

source§

impl<K, V> TryFromVal<Env, Map<K, V>> for RawValwhere
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,

§

type Error = ConversionError

source§

fn try_from_val(_env: &Env, v: &Map<K, V>) -> Result<Self, Self::Error>

source§

impl TryFromVal<Env, RawVal> for Address

§

type Error = <Address as TryFromVal<Env, Object>>::Error

source§

fn try_from_val(env: &Env, val: &RawVal) -> Result<Self, Self::Error>

source§

impl TryFromVal<Env, RawVal> for Bytes

§

type Error = <Bytes as TryFromVal<Env, Object>>::Error

source§

fn try_from_val(env: &Env, val: &RawVal) -> Result<Self, Self::Error>

source§

impl<const N: usize> TryFromVal<Env, RawVal> for BytesN<N>

§

type Error = ConversionError

source§

fn try_from_val(env: &Env, val: &RawVal) -> Result<Self, Self::Error>

source§

impl<K, V> TryFromVal<Env, RawVal> for Map<K, V>where
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,

§

type Error = <Map<K, V> as TryFromVal<Env, Object>>::Error

source§

fn try_from_val(env: &Env, val: &RawVal) -> Result<Self, Self::Error>

source§

impl<T> TryFromVal<Env, RawVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,

§

type Error = <Vec<T> as TryFromVal<Env, Object>>::Error

source§

fn try_from_val(env: &Env, val: &RawVal) -> Result<Self, Self::Error>

source§

impl<T> TryFromVal<Env, Vec<T>> for RawVal

§

type Error = ConversionError

source§

fn try_from_val(_env: &Env, v: &Vec<T>) -> Result<Self, Self::Error>

source§

impl TryFromVal<Host, AccountEd25519Signature> for RawVal

§

type Error = HostError

source§

fn try_from_val(
env: &Host,
val: &AccountEd25519Signature
) -> Result<RawVal, <RawVal as TryFromVal<Host, AccountEd25519Signature>>::Error>

source§

impl TryFromVal<Host, Address> for RawVal

§

type Error = HostError

source§

fn try_from_val(
_env: &Host,
val: &Address
) -> Result<RawVal, <RawVal as TryFromVal<Host, Address>>::Error>

source§

impl TryFromVal<Host, AllowanceDataKey> for RawVal

§

type Error = HostError

source§

fn try_from_val(
env: &Host,
val: &AllowanceDataKey
) -> Result<RawVal, <RawVal as TryFromVal<Host, AllowanceDataKey>>::Error>

source§

impl TryFromVal<Host, AlphaNum12Metadata> for RawVal

§

type Error = HostError

source§

fn try_from_val(
env: &Host,
val: &AlphaNum12Metadata
) -> Result<RawVal, <RawVal as TryFromVal<Host, AlphaNum12Metadata>>::Error>

source§

impl TryFromVal<Host, AlphaNum4Metadata> for RawVal

§

type Error = HostError

source§

fn try_from_val(
env: &Host,
val: &AlphaNum4Metadata
) -> Result<RawVal, <RawVal as TryFromVal<Host, AlphaNum4Metadata>>::Error>

source§

impl TryFromVal<Host, AuthorizationContext> for RawVal

§

type Error = HostError

source§

fn try_from_val(
env: &Host,
val: &AuthorizationContext
) -> Result<RawVal, <RawVal as TryFromVal<Host, AuthorizationContext>>::Error>

source§

impl TryFromVal<Host, BalanceValue> for RawVal

§

type Error = HostError

source§

fn try_from_val(
env: &Host,
val: &BalanceValue
) -> Result<RawVal, <RawVal as TryFromVal<Host, BalanceValue>>::Error>

source§

impl TryFromVal<Host, Bytes> for RawVal

§

type Error = HostError

source§

fn try_from_val(
_env: &Host,
val: &Bytes
) -> Result<RawVal, <RawVal as TryFromVal<Host, Bytes>>::Error>

source§

impl<const N: usize> TryFromVal<Host, BytesN<N>> for RawVal

§

type Error = HostError

source§

fn try_from_val(
_env: &Host,
val: &BytesN<N>
) -> Result<RawVal, <RawVal as TryFromVal<Host, BytesN<N>>>::Error>

source§

impl TryFromVal<Host, DataKey> for RawVal

§

type Error = HostError

source§

fn try_from_val(
env: &Host,
val: &DataKey
) -> Result<RawVal, <RawVal as TryFromVal<Host, DataKey>>::Error>

source§

impl TryFromVal<Host, Map> for RawVal

§

type Error = HostError

source§

fn try_from_val(
_env: &Host,
val: &Map
) -> Result<RawVal, <RawVal as TryFromVal<Host, Map>>::Error>

source§

impl TryFromVal<Host, Metadata> for RawVal

§

type Error = HostError

source§

fn try_from_val(
env: &Host,
val: &Metadata
) -> Result<RawVal, <RawVal as TryFromVal<Host, Metadata>>::Error>

source§

impl TryFromVal<Host, Vec> for RawVal

§

type Error = HostError

source§

fn try_from_val(
_env: &Host,
val: &Vec
) -> Result<RawVal, <RawVal as TryFromVal<Host, Vec>>::Error>

§

impl Copy for RawVal

§

impl Val for RawVal

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere
T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, C> Compare<&T> for Cwhere
C: Compare<T>,

§

type Error = <C as Compare<T>>::Error

§

fn compare(&self, a: &&T, b: &&T) -> Result<Ordering, <C as Compare<&T>>::Error>

§

impl<T, U, V, E, C> Compare<(T, U, V)> for Cwhere
C: Compare<T, Error = E, Error = E, Error = E> + Compare<U> + Compare<V>,

§

type Error = E

§

fn compare(
&self,
a: &(T, U, V),
b: &(T, U, V)
) -> Result<Ordering, <C as Compare<(T, U, V)>>::Error>

§

impl<T, U, E, C> Compare<(T, U)> for Cwhere
C: Compare<T, Error = E, Error = E> + Compare<U>,

§

type Error = E

§

fn compare(
&self,
a: &(T, U),
b: &(T, U)
) -> Result<Ordering, <C as Compare<(T, U)>>::Error>

§

impl<T, C> Compare<Box<T, Global>> for Cwhere
C: Compare<T>,

§

type Error = <C as Compare<T>>::Error

§

fn compare(
&self,
a: &Box<T, Global>,
b: &Box<T, Global>
) -> Result<Ordering, <C as Compare<Box<T, Global>>>::Error>

§

impl<T, C> Compare<Option<T>> for Cwhere
C: Compare<T>,

§

type Error = <C as Compare<T>>::Error

§

fn compare(
&self,
a: &Option<T>,
b: &Option<T>
) -> Result<Ordering, <C as Compare<Option<T>>>::Error>

§

impl<E> Compare<RawVal> for Ewhere
E: Env,

§

type Error = <E as EnvBase>::Error

§

fn compare(
&self,
a: &RawVal,
b: &RawVal
) -> Result<Ordering, <E as Compare<RawVal>>::Error>

§

impl<T, C> Compare<Rc<T>> for Cwhere
C: Compare<T>,

§

type Error = <C as Compare<T>>::Error

§

fn compare(
&self,
a: &Rc<T>,
b: &Rc<T>
) -> Result<Ordering, <C as Compare<Rc<T>>>::Error>

§

impl<T, C> Compare<Vec<T, Global>> for Cwhere
C: Compare<T>,

§

type Error = <C as Compare<T>>::Error

§

fn compare(
&self,
a: &Vec<T, Global>,
b: &Vec<T, Global>
) -> Result<Ordering, <C as Compare<Vec<T, Global>>>::Error>

source§

impl<T> Deserialize for Twhere
T: TryFromVal<Env, RawVal>,

§

type Error = <T as TryFromVal<Env, RawVal>>::Error

source§

fn deserialize(env: &Env, b: &Bytes) -> Result<T, <T as Deserialize>::Error>

§

impl<T> Downcast for Twhere
T: Any,

§

fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for Twhere
T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync + 'static>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> Serialize for Twhere
T: IntoVal<Env, RawVal>,

source§

fn serialize(self, env: &Env) -> Bytes

source§

impl<T> ToOwned for Twhere
T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere
U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<E, T, U> TryIntoVal<E, T> for Uwhere
E: Env,
T: TryFromVal<E, U>,

§

type Error = <T as TryFromVal<E, U>>::Error

§

fn try_into_val(&self, env: &E) -> Result<T, <U as TryIntoVal<E, T>>::Error>

§

impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,

§

fn vzip(self) -> V