pub enum Value {
Show 22 variants
Bool(bool),
U8(u8),
U16(u16),
U32(u32),
U64(u64),
S8(i8),
S16(i16),
S32(i32),
S64(i64),
F32(f32),
F64(f64),
Char(char),
String(String),
List(Vec<Value>),
Tuple(Vec<Value>),
Record(Vec<Value>),
Variant {
case_idx: u32,
case_value: Option<Box<Value>>,
},
Enum(u32),
Flags(Vec<bool>),
Option(Option<Box<Value>>),
Result(Result<Option<Box<Value>>, Option<Box<Value>>>),
Handle {
uri: String,
resource_id: u64,
instance_name: String,
},
}Variants§
Bool(bool)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
S8(i8)
S16(i16)
S32(i32)
S64(i64)
F32(f32)
F64(f64)
Char(char)
String(String)
List(Vec<Value>)
Tuple(Vec<Value>)
Record(Vec<Value>)
Variant
Enum(u32)
Flags(Vec<bool>)
Option(Option<Box<Value>>)
Result(Result<Option<Box<Value>>, Option<Box<Value>>>)
Handle
Guest resource handle at the interpreter boundary.
resource_id— embedder-defined id (for example a table slot in Wasmtime).instance_name— component instance key (instance()/instance("x")) used to route host calls for resource methods. When empty,handle_instance_namefalls back to the last/segment ofurifor older embedders.
Implementations§
Trait Implementations§
Source§impl From<ValueAndType> for Value
impl From<ValueAndType> for Value
Source§fn from(value_and_type: ValueAndType) -> Self
fn from(value_and_type: ValueAndType) -> Self
Converts to this type from the input type.
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