Struct wasmparser::BrTable

source ·
pub struct BrTable<'a> { /* private fields */ }
Expand description

A br_table entries representation.

Implementations

Reads br_table entries.

Examples
let buf = vec![0x0e, 0x02, 0x01, 0x02, 0x00];
let mut reader = wasmparser::BinaryReader::new(&buf);
let op = reader.read_operator().unwrap();
if let wasmparser::Operator::BrTable { ref table } = op {
    let br_table_depths = table.read_table();
    assert!(br_table_depths.0 == vec![1,2].into_boxed_slice() &&
            br_table_depths.1 == 0);
} else {
    unreachable!();
}

Trait Implementations

Formats the value using the given formatter. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.