Struct wasmi::RuntimeArgs
source · [−]pub struct RuntimeArgs<'a>(_);
Expand description
Wrapper around slice of RuntimeValue
for using it
as an argument list conveniently.
Implementations
sourceimpl<'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) -> T where
T: FromRuntimeValue,
pub fn nth<T>(&self, idx: usize) -> T where
T: FromRuntimeValue,
Trait Implementations
sourceimpl<'a> AsRef<[RuntimeValue]> for RuntimeArgs<'a>
impl<'a> AsRef<[RuntimeValue]> for RuntimeArgs<'a>
sourcefn as_ref(&self) -> &[RuntimeValue]
fn as_ref(&self) -> &[RuntimeValue]
Performs the conversion.
sourceimpl<'a> Debug for RuntimeArgs<'a>
impl<'a> Debug for RuntimeArgs<'a>
sourceimpl<'a> From<&'a [RuntimeValue]> for RuntimeArgs<'a>
impl<'a> From<&'a [RuntimeValue]> for RuntimeArgs<'a>
sourcefn from(inner: &'a [RuntimeValue]) -> Self
fn from(inner: &'a [RuntimeValue]) -> Self
Performs the conversion.
Auto Trait Implementations
impl<'a> RefUnwindSafe for RuntimeArgs<'a>
impl<'a> Send for RuntimeArgs<'a>
impl<'a> Sync for RuntimeArgs<'a>
impl<'a> Unpin for RuntimeArgs<'a>
impl<'a> UnwindSafe for RuntimeArgs<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more