Struct Value
pub struct Value(/* private fields */);
Expand description
A Value is a WAVE value, and implements WasmValue
.
Trait Implementations§
§impl<T1, T2, T3> From<(T1, T2, T3)> for Value
impl<T1, T2, T3> From<(T1, T2, T3)> for Value
§fn from(_: (T1, T2, T3)) -> Value
fn from(_: (T1, T2, T3)) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4> From<(T1, T2, T3, T4)> for Value
impl<T1, T2, T3, T4> From<(T1, T2, T3, T4)> for Value
§fn from(_: (T1, T2, T3, T4)) -> Value
fn from(_: (T1, T2, T3, T4)) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4, T5> From<(T1, T2, T3, T4, T5)> for Value
impl<T1, T2, T3, T4, T5> From<(T1, T2, T3, T4, T5)> for Value
§fn from(_: (T1, T2, T3, T4, T5)) -> Value
fn from(_: (T1, T2, T3, T4, T5)) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4, T5, T6> From<(T1, T2, T3, T4, T5, T6)> for Value
impl<T1, T2, T3, T4, T5, T6> From<(T1, T2, T3, T4, T5, T6)> for Value
§fn from(_: (T1, T2, T3, T4, T5, T6)) -> Value
fn from(_: (T1, T2, T3, T4, T5, T6)) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4, T5, T6, T7> From<(T1, T2, T3, T4, T5, T6, T7)> for Value
impl<T1, T2, T3, T4, T5, T6, T7> From<(T1, T2, T3, T4, T5, T6, T7)> for Value
§fn from(_: (T1, T2, T3, T4, T5, T6, T7)) -> Value
fn from(_: (T1, T2, T3, T4, T5, T6, T7)) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4, T5, T6, T7, T8> From<(T1, T2, T3, T4, T5, T6, T7, T8)> for Value
impl<T1, T2, T3, T4, T5, T6, T7, T8> From<(T1, T2, T3, T4, T5, T6, T7, T8)> for Value
§fn from(_: (T1, T2, T3, T4, T5, T6, T7, T8)) -> Value
fn from(_: (T1, T2, T3, T4, T5, T6, T7, T8)) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9)> for Value
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9)> for Value
§fn from(_: (T1, T2, T3, T4, T5, T6, T7, T8, T9)) -> Value
fn from(_: (T1, T2, T3, T4, T5, T6, T7, T8, T9)) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
§fn from(_: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)) -> Value
fn from(_: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
T11: ValueTyped + Into<Value>,
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
T11: ValueTyped + Into<Value>,
§fn from(_: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)) -> Value
fn from(_: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
T11: ValueTyped + Into<Value>,
T12: ValueTyped + Into<Value>,
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
T11: ValueTyped + Into<Value>,
T12: ValueTyped + Into<Value>,
§fn from(_: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)) -> Value
fn from(_: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
T11: ValueTyped + Into<Value>,
T12: ValueTyped + Into<Value>,
T13: ValueTyped + Into<Value>,
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
T11: ValueTyped + Into<Value>,
T12: ValueTyped + Into<Value>,
T13: ValueTyped + Into<Value>,
§fn from(_: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)) -> Value
fn from(_: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
T11: ValueTyped + Into<Value>,
T12: ValueTyped + Into<Value>,
T13: ValueTyped + Into<Value>,
T14: ValueTyped + Into<Value>,
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
T11: ValueTyped + Into<Value>,
T12: ValueTyped + Into<Value>,
T13: ValueTyped + Into<Value>,
T14: ValueTyped + Into<Value>,
§fn from(
_: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14),
) -> Value
fn from( _: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14), ) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
T11: ValueTyped + Into<Value>,
T12: ValueTyped + Into<Value>,
T13: ValueTyped + Into<Value>,
T14: ValueTyped + Into<Value>,
T15: ValueTyped + Into<Value>,
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
T11: ValueTyped + Into<Value>,
T12: ValueTyped + Into<Value>,
T13: ValueTyped + Into<Value>,
T14: ValueTyped + Into<Value>,
T15: ValueTyped + Into<Value>,
§fn from(
_: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15),
) -> Value
fn from( _: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15), ) -> Value
Converts to this type from the input type.
§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
T11: ValueTyped + Into<Value>,
T12: ValueTyped + Into<Value>,
T13: ValueTyped + Into<Value>,
T14: ValueTyped + Into<Value>,
T15: ValueTyped + Into<Value>,
T16: ValueTyped + Into<Value>,
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> From<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)> for Valuewhere
T1: ValueTyped + Into<Value>,
T2: ValueTyped + Into<Value>,
T3: ValueTyped + Into<Value>,
T4: ValueTyped + Into<Value>,
T5: ValueTyped + Into<Value>,
T6: ValueTyped + Into<Value>,
T7: ValueTyped + Into<Value>,
T8: ValueTyped + Into<Value>,
T9: ValueTyped + Into<Value>,
T10: ValueTyped + Into<Value>,
T11: ValueTyped + Into<Value>,
T12: ValueTyped + Into<Value>,
T13: ValueTyped + Into<Value>,
T14: ValueTyped + Into<Value>,
T15: ValueTyped + Into<Value>,
T16: ValueTyped + Into<Value>,
§fn from(
_: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16),
) -> Value
fn from( _: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16), ) -> Value
Converts to this type from the input type.
§impl WasmValue for Value
impl WasmValue for Value
§fn kind(&self) -> WasmTypeKind
fn kind(&self) -> WasmTypeKind
The kind of type of this value.
§fn unwrap_bool(&self) -> bool
fn unwrap_bool(&self) -> bool
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn unwrap_s8(&self) -> i8
fn unwrap_s8(&self) -> i8
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn unwrap_s16(&self) -> i16
fn unwrap_s16(&self) -> i16
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn unwrap_s32(&self) -> i32
fn unwrap_s32(&self) -> i32
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn unwrap_s64(&self) -> i64
fn unwrap_s64(&self) -> i64
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn unwrap_u8(&self) -> u8
fn unwrap_u8(&self) -> u8
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn unwrap_u16(&self) -> u16
fn unwrap_u16(&self) -> u16
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn unwrap_u32(&self) -> u32
fn unwrap_u32(&self) -> u32
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn unwrap_u64(&self) -> u64
fn unwrap_u64(&self) -> u64
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn unwrap_char(&self) -> char
fn unwrap_char(&self) -> char
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn make_list(
ty: &<Value as WasmValue>::Type,
vals: impl IntoIterator<Item = Value>,
) -> Result<Value, WasmValueError>
fn make_list( ty: &<Value as WasmValue>::Type, vals: impl IntoIterator<Item = Value>, ) -> Result<Value, WasmValueError>
Returns a new WasmValue of the given type. Read more
§fn make_record<'a>(
ty: &<Value as WasmValue>::Type,
fields: impl IntoIterator<Item = (&'a str, Value)>,
) -> Result<Value, WasmValueError>
fn make_record<'a>( ty: &<Value as WasmValue>::Type, fields: impl IntoIterator<Item = (&'a str, Value)>, ) -> Result<Value, WasmValueError>
Returns a new WasmValue of the given type. Read more
§fn make_tuple(
ty: &<Value as WasmValue>::Type,
vals: impl IntoIterator<Item = Value>,
) -> Result<Value, WasmValueError>
fn make_tuple( ty: &<Value as WasmValue>::Type, vals: impl IntoIterator<Item = Value>, ) -> Result<Value, WasmValueError>
Returns a new WasmValue of the given type. Read more
§fn make_variant(
ty: &<Value as WasmValue>::Type,
case_name: &str,
val: Option<Value>,
) -> Result<Value, WasmValueError>
fn make_variant( ty: &<Value as WasmValue>::Type, case_name: &str, val: Option<Value>, ) -> Result<Value, WasmValueError>
Returns a new WasmValue of the given type. Read more
§fn make_enum(
ty: &<Value as WasmValue>::Type,
case: &str,
) -> Result<Value, WasmValueError>
fn make_enum( ty: &<Value as WasmValue>::Type, case: &str, ) -> Result<Value, WasmValueError>
Returns a new WasmValue of the given type. Read more
§fn make_option(
ty: &<Value as WasmValue>::Type,
val: Option<Value>,
) -> Result<Value, WasmValueError>
fn make_option( ty: &<Value as WasmValue>::Type, val: Option<Value>, ) -> Result<Value, WasmValueError>
Returns a new WasmValue of the given type. Read more
§fn make_result(
ty: &<Value as WasmValue>::Type,
val: Result<Option<Value>, Option<Value>>,
) -> Result<Value, WasmValueError>
fn make_result( ty: &<Value as WasmValue>::Type, val: Result<Option<Value>, Option<Value>>, ) -> Result<Value, WasmValueError>
Returns a new WasmValue of the given type. Read more
§fn make_flags<'a>(
ty: &<Value as WasmValue>::Type,
names: impl IntoIterator<Item = &'a str>,
) -> Result<Value, WasmValueError>
fn make_flags<'a>( ty: &<Value as WasmValue>::Type, names: impl IntoIterator<Item = &'a str>, ) -> Result<Value, WasmValueError>
Returns a new WasmValue of the given type. Read more
§fn unwrap_f32(&self) -> f32
fn unwrap_f32(&self) -> f32
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn unwrap_f64(&self) -> f64
fn unwrap_f64(&self) -> f64
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn unwrap_string(&self) -> Cow<'_, str>
fn unwrap_string(&self) -> Cow<'_, str>
Returns the underlying value of the WasmValue, panicing if it’s the wrong type. Read more
§fn unwrap_list(&self) -> Box<dyn Iterator<Item = Cow<'_, Value>> + '_>
fn unwrap_list(&self) -> Box<dyn Iterator<Item = Cow<'_, Value>> + '_>
Returns an iterator of the element Vals of the list. Read more
§fn unwrap_record(
&self,
) -> Box<dyn Iterator<Item = (Cow<'_, str>, Cow<'_, Value>)> + '_>
fn unwrap_record( &self, ) -> Box<dyn Iterator<Item = (Cow<'_, str>, Cow<'_, Value>)> + '_>
Returns an iterator of the field names and Vals of the record. Read more
§fn unwrap_tuple(&self) -> Box<dyn Iterator<Item = Cow<'_, Value>> + '_>
fn unwrap_tuple(&self) -> Box<dyn Iterator<Item = Cow<'_, Value>> + '_>
Returns an iterator of the field Vals of the tuple. Read more
§fn unwrap_variant(&self) -> (Cow<'_, str>, Option<Cow<'_, Value>>)
fn unwrap_variant(&self) -> (Cow<'_, str>, Option<Cow<'_, Value>>)
Returns the variant case name and optional payload WasmValue of the variant. Read more
§fn unwrap_enum(&self) -> Cow<'_, str>
fn unwrap_enum(&self) -> Cow<'_, str>
Returns the case name of the enum. Read more
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more