pub fn grow(&self, delta: u32, init: Val) -> Result<u32> {
        let index = self.wasmtime_table_index();
        let item = into_checked_anyfunc(init, &self.store)?;
        if let Some(len) = self.wasmtime_handle.clone().table_grow(index, delta) {
            let mut wasmtime_handle = self.wasmtime_handle.clone();
            for i in 0..delta {
                let i = len - (delta - i);
                set_table_item(&mut wasmtime_handle, index, i, item.clone())?;
            }
            Ok(len)
        } else {
            bail!("failed to grow table by `{}`", delta)
        }
    }
/// Grows the size of this table by `delta` more elements, initialization
/// all new elements to `init`.
///
/// # Errors
///
/// Returns an error if the table cannot be grown by `delta`, for example
/// if it would cause the table to exceed its maximum size. Also returns an
/// error if `init` is not of the right type.
Grows the size of this table by `delta` more elements, initialization
all new elements to `init`.
Grows the size of this table by ` delta ` more elements initialization all new elements to ` init ` .
pub fn grow(&self, delta: u32, init: Val) -> Result<u32> {
        let index = self.wasmtime_table_index();
        let item = into_checked_anyfunc(init, &self.store)?;
        if let Some(len) = self.wasmtime_handle.clone().table_grow(index, delta) {
            let mut wasmtime_handle = self.wasmtime_handle.clone();
            for i in 0..delta {
                let i = len - (delta - i);
                set_table_item(&mut wasmtime_handle, index, i, item.clone())?;
            }
            Ok(len)
        } else {
            bail!("failed to grow table by `{}`", delta)
        }
    }
pub fn grow ( & self , delta : u32 , init : Val ) -> Result < u32 > { let index = self . wasmtime_table_index ( ) ; let item = into_checked_anyfunc ( init , & self . store ) ? ; if let Some ( len ) = self . wasmtime_handle . clone ( ) . table_grow ( index , delta ) { let mut wasmtime_handle = self . wasmtime_handle . clone ( ) ; for i in 0 .. delta { let i = len - ( delta - i ) ; set_table_item ( & mut wasmtime_handle , index , i , item . clone ( ) ) ? ; } Ok ( len ) } else { bail ! ( " " delta ) } }
Grows the size of this table by `delta` more elements, initialization
all new elements to `init`.
Grows the size of this table by ` delta ` more elements initialization all new elements to ` init ` .
&self
delta
u32
init
Val
&self
delta
u32
init
Val
errors
Returns an error if the table cannot be grown by `delta`, for example
if it would cause the table to exceed its maximum size. Also returns an
error if `init` is not of the right type.
Returns an error if the table cannot be grown by ` delta ` for example if it would cause the table to exceed its maximum size . Also returns an error if ` init ` is not of the right type .