pub struct TableIdx(u32);Tuple Fields§
§0: u32Implementations§
Source§impl TableIdx
impl TableIdx
Sourcepub unsafe fn decode_unchecked(wasm: &mut WasmDecoder<'_>) -> Self
pub unsafe fn decode_unchecked(wasm: &mut WasmDecoder<'_>) -> Self
Reads a table index from Wasm code without validating it.
§Safety
The caller must ensure that there is a valid table index in the WasmDecoder.
Source§impl TableIdx
impl TableIdx
Sourcepub fn validate<T>(
index: u32,
c_tables: &IdxVec<TableIdx, T>,
) -> Result<Self, ValidationError>
pub fn validate<T>( index: u32, c_tables: &IdxVec<TableIdx, T>, ) -> Result<Self, ValidationError>
Validates that a given index is a valid table index.
On success a new TableIdx is returned, otherwise a
ValidationError is returned.
Sourcepub fn decode_and_validate<T>(
wasm: &mut WasmDecoder<'_>,
c_tables: &IdxVec<TableIdx, T>,
) -> Result<Self, ValidationError>
pub fn decode_and_validate<T>( wasm: &mut WasmDecoder<'_>, c_tables: &IdxVec<TableIdx, T>, ) -> Result<Self, ValidationError>
Reads a table index from Wasm code and validates that it is a valid index for a given tables vector.
Trait Implementations§
Source§impl Ord for TableIdx
impl Ord for TableIdx
Source§impl PartialOrd for TableIdx
impl PartialOrd for TableIdx
impl Copy for TableIdx
impl Eq for TableIdx
impl StructuralPartialEq for TableIdx
Auto Trait Implementations§
impl Freeze for TableIdx
impl RefUnwindSafe for TableIdx
impl Send for TableIdx
impl Sync for TableIdx
impl Unpin for TableIdx
impl UnwindSafe for TableIdx
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more