#[repr(transparent)]
pub struct RawVal(_);
Expand description

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§

source§

impl RawVal

source

pub const fn get_payload(self) -> u64

source

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

source

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

source

pub const fn is_u63(self) -> bool

source

pub const unsafe fn unchecked_as_u63(self) -> i64

source

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

source

pub const fn get_tag(self) -> Tag

source

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

source

pub const fn from_void() -> RawVal

source

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

source

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

source

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

source

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

source

pub const fn is_i32_zero(self) -> bool

source

pub const fn is_u32_zero(self) -> bool

source

pub const fn is_void(self) -> bool

source

pub const fn is_true(self) -> bool

source

pub const fn is_false(self) -> bool

source§

impl RawVal

source

pub const I32_ZERO: RawVal = _

source

pub const I32_POSITIVE_ONE: RawVal = _

source

pub const I32_NEGATIVE_ONE: RawVal = _

source

pub const I32_MIN: RawVal = _

source

pub const I32_MAX: RawVal = _

source

pub const U32_ZERO: RawVal = _

source

pub const U32_ONE: RawVal = _

source

pub const U32_MIN: RawVal = _

source

pub const U32_MAX: RawVal = _

source

pub const VOID: RawVal = _

source

pub const TRUE: RawVal = _

source

pub const FALSE: RawVal = _

Trait Implementations§

source§

impl AsMut<RawVal> for BitSet

source§

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

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

impl AsMut<RawVal> for Object

source§

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

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

impl AsMut<RawVal> for RawVal

source§

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

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

impl AsMut<RawVal> for Static

source§

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

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

impl AsMut<RawVal> for Status

source§

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

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

impl AsMut<RawVal> for Symbol

source§

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

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

impl AsRef<RawVal> for BitSet

source§

fn as_ref(&self) -> &RawVal

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

impl AsRef<RawVal> for Object

source§

fn as_ref(&self) -> &RawVal

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

impl AsRef<RawVal> for RawVal

source§

fn as_ref(&self) -> &RawVal

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

impl AsRef<RawVal> for Static

source§

fn as_ref(&self) -> &RawVal

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

impl AsRef<RawVal> for Status

source§

fn as_ref(&self) -> &RawVal

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

impl AsRef<RawVal> for Symbol

source§

fn as_ref(&self) -> &RawVal

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

impl Clone for RawVal

source§

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
source§

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

§

type Error = <E as EnvBase>::Error

source§

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

source§

impl Debug for RawVal

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for RawVal

source§

fn default() -> Self

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

impl From<&()> for RawVal

source§

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

Converts to this type from the input type.
source§

impl From<&ScStatus> for RawVal

source§

fn from(st: &ScStatus) -> Self

Converts to this type from the input type.
source§

impl From<&i32> for RawVal

source§

fn from(i: &i32) -> Self

Converts to this type from the input type.
source§

impl From<&u32> for RawVal

source§

fn from(u: &u32) -> Self

Converts to this type from the input type.
source§

impl From<()> for RawVal

source§

fn from(_: ()) -> Self

Converts to this type from the input type.
source§

impl From<BitSet> for RawVal

source§

fn from(b: BitSet) -> Self

Converts to this type from the input type.
source§

impl From<Object> for RawVal

source§

fn from(b: Object) -> Self

Converts to this type from the input type.
source§

impl From<RawVal> for Value

source§

fn from(v: RawVal) -> Self

Converts to this type from the input type.
source§

impl From<ScStatus> for RawVal

source§

fn from(st: ScStatus) -> Self

Converts to this type from the input type.
source§

impl From<Static> for RawVal

source§

fn from(b: Static) -> Self

Converts to this type from the input type.
source§

impl From<Status> for RawVal

source§

fn from(b: Status) -> Self

Converts to this type from the input type.
source§

impl From<Symbol> for RawVal

source§

fn from(b: Symbol) -> Self

Converts to this type from the input type.
source§

impl From<bool> for RawVal

source§

fn from(b: bool) -> Self

Converts to this type from the input type.
source§

impl From<i32> for RawVal

source§

fn from(i: i32) -> Self

Converts to this type from the input type.
source§

impl From<u32> for RawVal

source§

fn from(u: u32) -> Self

Converts to this type from the input type.
source§

impl FromValue for RawVal

source§

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

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

impl TryFrom<&RawVal> for ()

§

type Error = ConversionError

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

fn try_from(v: &RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&RawVal> for BitSet

§

type Error = ConversionError

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

fn try_from(v: &RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&RawVal> for Object

§

type Error = ConversionError

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

fn try_from(v: &RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&RawVal> for Static

§

type Error = ConversionError

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

fn try_from(v: &RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&RawVal> for Status

§

type Error = ConversionError

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

fn try_from(v: &RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&RawVal> for Symbol

§

type Error = ConversionError

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

fn try_from(v: &RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&RawVal> for bool

§

type Error = ConversionError

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

fn try_from(v: &RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&RawVal> for i32

§

type Error = ConversionError

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

fn try_from(v: &RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&RawVal> for u32

§

type Error = ConversionError

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

fn try_from(v: &RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<RawVal> for ()

§

type Error = ConversionError

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

fn try_from(v: RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<RawVal> for BitSet

§

type Error = ConversionError

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

fn try_from(v: RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<RawVal> for Object

§

type Error = ConversionError

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

fn try_from(v: RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<RawVal> for Static

§

type Error = ConversionError

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

fn try_from(v: RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<RawVal> for Status

§

type Error = ConversionError

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

fn try_from(v: RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<RawVal> for Symbol

§

type Error = ConversionError

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

fn try_from(v: RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<RawVal> for bool

§

type Error = ConversionError

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

fn try_from(v: RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<RawVal> for i32

§

type Error = ConversionError

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

fn try_from(v: RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<RawVal> for u32

§

type Error = ConversionError

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

fn try_from(v: RawVal) -> Result<Self, Self::Error>

Performs the conversion.
source§

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

§

type Error = Status

source§

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

source§

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

source§

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

§

type Error = Status

source§

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

source§

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

§

type Error = ConversionError

source§

fn try_from_val(_env: &E, val: &()) -> Result<Self, Self::Error>

source§

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

§

type Error = ConversionError

source§

fn try_from_val(env: &E, v: &(T0,)) -> Result<Self, Self::Error>

source§

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

§

type Error = ConversionError

source§

fn try_from_val(env: &E, v: &(T0, T1)) -> Result<Self, Self::Error>

source§

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

source§

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

source§

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

source§

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

source§

impl<E: Env, T0, T1, T2, T3, T4, T5, T6> TryFromVal<E, (T0, T1, T2, T3, T4, T5, T6)> for RawValwhere 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>,

source§

impl<E: Env, T0, T1, T2, T3, T4, T5, T6, T7> TryFromVal<E, (T0, T1, T2, T3, T4, T5, T6, T7)> for RawValwhere 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>,

source§

impl<E: Env, T0, T1, T2, T3, T4, T5, T6, T7, T8> TryFromVal<E, (T0, T1, T2, T3, T4, T5, T6, T7, T8)> for RawValwhere 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>,

source§

impl<E: Env, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> TryFromVal<E, (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)> for RawValwhere 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>,

source§

impl<E: Env, 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 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>,

source§

impl<E: Env, 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 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>,

source§

impl<E: Env, 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 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>,

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

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

source§

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

source§

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

§

type Error = Status

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

impl<E: Env, T0, T1, T2, T3, T4, T5, T6> TryFromVal<E, RawVal> for (T0, T1, T2, T3, T4, T5, T6)where 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>,

§

type Error = ConversionError

source§

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

source§

impl<E: Env, T0, T1, T2, T3, T4, T5, T6, T7> TryFromVal<E, RawVal> for (T0, T1, T2, T3, T4, T5, T6, T7)where 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>,

§

type Error = ConversionError

source§

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

source§

impl<E: Env, T0, T1, T2, T3, T4, T5, T6, T7, T8> TryFromVal<E, RawVal> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)where 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>,

§

type Error = ConversionError

source§

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

source§

impl<E: Env, 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 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>,

§

type Error = ConversionError

source§

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

source§

impl<E: Env, 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 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>,

§

type Error = ConversionError

source§

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

source§

impl<E: Env, 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 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>,

§

type Error = ConversionError

source§

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

source§

impl<E: Env, 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 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>,

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

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

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = Status

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

fn try_from_val(env: &E, v: &RawVal) -> Result<Self, Self::Error>

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

fn try_from_val(env: &E, v: &RawVal) -> Result<Self, Self::Error>

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

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

source§

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

§

type Error = ConversionError

source§

fn try_from_val(env: &E, v: &String) -> Result<Self, Self::Error>

source§

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

§

type Error = ConversionError

source§

fn try_from_val(_env: &E, val: &Symbol) -> Result<Self, Self::Error>

source§

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

§

type Error = Status

source§

fn try_from_val(env: &E, v: &Vec<u8>) -> Result<Self, Self::Error>

source§

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

§

type Error = ConversionError

source§

fn try_from_val(_env: &E, val: &bool) -> Result<Self, Self::Error>

source§

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

§

type Error = ConversionError

source§

fn try_from_val(env: &E, v: &i128) -> Result<Self, Self::Error>

source§

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

§

type Error = ConversionError

source§

fn try_from_val(_env: &E, val: &i32) -> Result<Self, Self::Error>

source§

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

§

type Error = ConversionError

source§

fn try_from_val(env: &E, v: &i64) -> Result<Self, Self::Error>

source§

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

§

type Error = ConversionError

source§

fn try_from_val(env: &E, v: &u128) -> Result<Self, Self::Error>

source§

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

§

type Error = ConversionError

source§

fn try_from_val(_env: &E, val: &u32) -> Result<Self, Self::Error>

source§

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

§

type Error = ConversionError

source§

fn try_from_val(env: &E, v: &u64) -> Result<Self, Self::Error>

source§

impl Copy for RawVal

source§

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> 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 + Sync + Send + '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> 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.