[−][src]Struct wasmtime_runtime::Table
A table instance.
Implementations
impl Table
[src]
pub fn new(plan: &TablePlan) -> Self
[src]
Create a new table instance with specified minimum and maximum number of elements.
pub fn size(&self) -> u32
[src]
Returns the number of allocated elements.
pub fn grow(&self, delta: u32) -> Option<u32>
[src]
Grow table by the specified amount of elements.
Returns None
if table can't be grown by the specified amount
of elements. Returns the previous size of the table if growth is
successful.
pub fn get(&self, index: u32) -> Option<VMCallerCheckedAnyfunc>
[src]
Get reference to the specified element.
Returns None
if the index is out of bounds.
pub fn set(&self, index: u32, func: VMCallerCheckedAnyfunc) -> Result<(), ()>
[src]
pub fn copy(
dst_table: &Self,
src_table: &Self,
dst_index: u32,
src_index: u32,
len: u32
) -> Result<(), Trap>
[src]
dst_table: &Self,
src_table: &Self,
dst_index: u32,
src_index: u32,
len: u32
) -> Result<(), Trap>
Copy len
elements from src_table[src_index..]
into dst_table[dst_index..]
.
Errors
Returns an error if the range is out of bounds of either the source or destination tables.
pub fn vmtable(&self) -> VMTableDefinition
[src]
Return a VMTableDefinition
for exposing the table to compiled wasm code.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Table
impl !Send for Table
impl !Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
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,
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> Same<T> for T
type Output = T
Should always be Self
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.
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>,