Struct wasmi_validation::util::Locals[][src]

pub struct Locals<'a> { /* fields omitted */ }

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]

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

impl<'a> Debug for Locals<'a>[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.