Struct wasmi_validation::util::Locals [−][src]
Locals are the concatenation of a slice of function parameters with function declared local variables.
Local variables are given in the form of groups represented by pairs of a value_type and a count.
Implementations
impl<'a> Locals<'a>
[src]
pub fn new(
params: &'a [ValueType],
local_groups: &'a [Local]
) -> Result<Locals<'a>, Error>
[src]
params: &'a [ValueType],
local_groups: &'a [Local]
) -> Result<Locals<'a>, Error>
Create a new wrapper around declared variables and parameters.
pub fn param_count(&self) -> u32
[src]
Returns parameter count.
pub fn count(&self) -> u32
[src]
Returns total count of all declared locals and paramaterers.
pub fn type_of_local(&self, idx: u32) -> Result<ValueType, Error>
[src]
Returns the type of a local variable (either a declared local or a param).
Returns Err
in the case of overflow or when idx falls out of range.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Locals<'a>
impl<'a> Send for Locals<'a>
impl<'a> Sync for Locals<'a>
impl<'a> Unpin for Locals<'a>
impl<'a> UnwindSafe for Locals<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,