Struct wasmi::RuntimeArgs
source · pub struct RuntimeArgs<'a>(_);
Expand description
Wrapper around slice of RuntimeValue
for using it
as an argument list conveniently.
Implementations§
source§impl<'a> RuntimeArgs<'a>
impl<'a> RuntimeArgs<'a>
sourcepub fn nth_checked<T>(&self, idx: usize) -> Result<T, Trap>where
T: FromRuntimeValue,
pub fn nth_checked<T>(&self, idx: usize) -> Result<T, Trap>where
T: FromRuntimeValue,
sourcepub fn nth_value_checked(&self, idx: usize) -> Result<RuntimeValue, Trap>
pub fn nth_value_checked(&self, idx: usize) -> Result<RuntimeValue, Trap>
Extract argument as a RuntimeValue
by index idx
.
Errors
Returns Err
if this list has not enough arguments.
sourcepub fn nth<T>(&self, idx: usize) -> Twhere
T: FromRuntimeValue,
pub fn nth<T>(&self, idx: usize) -> Twhere
T: FromRuntimeValue,
Trait Implementations§
source§impl<'a> AsRef<[RuntimeValue]> for RuntimeArgs<'a>
impl<'a> AsRef<[RuntimeValue]> for RuntimeArgs<'a>
source§fn as_ref(&self) -> &[RuntimeValue]
fn as_ref(&self) -> &[RuntimeValue]
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<'a> Debug for RuntimeArgs<'a>
impl<'a> Debug for RuntimeArgs<'a>
source§impl<'a> From<&'a [RuntimeValue]> for RuntimeArgs<'a>
impl<'a> From<&'a [RuntimeValue]> for RuntimeArgs<'a>
source§fn from(inner: &'a [RuntimeValue]) -> Self
fn from(inner: &'a [RuntimeValue]) -> Self
Converts to this type from the input type.