Enum Value
pub enum Value {
Undefined,
String(u32),
Bool(bool),
I64(i64),
I32(i32),
U32(u32),
U64(u64),
F64(f64),
F32(f32),
FunctionRef(u32),
HeapRef(u32),
}Variants§
Undefined
String(u32)
a string value from the string interner
Bool(bool)
a boolean value
I64(i64)
a signed 64-bit integer
I32(i32)
a signed 32-bit integer
U32(u32)
an unsigned 32-bit integer
U64(u64)
an unsigned 64-bit integer
F64(f64)
a 64-bit floating point number
F32(f32)
a 32-bit floating point number
FunctionRef(u32)
a reference to a function by its index in the function table
HeapRef(u32)
a reference to an immutable heap object by its index in the heap table
Implementations§
§impl Value
impl Value
pub fn get_function_ref(&self) -> Result<u32, Report>
pub fn get_heap_ref(&self) -> Result<u32, Report>
Trait Implementations§
Source§impl ConstantValue for Value
impl ConstantValue for Value
Source§fn string_index(&self) -> Option<u32>
fn string_index(&self) -> Option<u32>
The
strings index this constant refers to, if any.Source§fn function_index(&self) -> Option<u32>
fn function_index(&self) -> Option<u32>
The
functions index this constant refers to, if any.impl Copy for Value
§impl Print for Value
Print a type-tagged value such as u64 3 or f64 -0.5.
impl Print for Value
Print a type-tagged value such as u64 3 or f64 -0.5.
Finite floats print as their shortest round-tripping decimal. NaN and the
infinities print as f64_bits/f32_bits so the exact bit pattern
(including NaN payloads) survives a reparse.
impl StructuralPartialEq for Value
§impl WriteBytes for Value
impl WriteBytes 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<D> Apply<PushToStack<()>> for D
impl<D> Apply<PushToStack<()>> for D
Source§fn apply(&mut self, _: PushToStack<()>)
fn apply(&mut self, _: PushToStack<()>)
Apply a single effect to this destination.
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
impl<T> BytecodeHeader for Twhere
T: FromBytes,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
An iterator over the items within this container, by reference.
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
Check whether an item is contained within this sequence.
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
Convert an item of the sequence into a [
MaybeRef].