pub fn new_static(
        plan: &TablePlan,
        data: &'static mut [usize],
        store: &mut dyn Store,
    ) -> Result<Self> {
        Self::limit_new(plan, store)?;
        let size = plan.table.minimum;
        let ty = wasm_to_table_type(plan.table.wasm_ty)?;
        let data = match plan.table.maximum {
            Some(max) if (max as usize) < data.len() => &mut data[..max as usize],
            _ => data,
        };

        Ok(Table::Static { data, size, ty })
    }
/// Create a new static (immovable) table instance for the specified table plan.
Create a new static (immovable) table instance for the specified table plan.
Create a new static ( immovable ) table instance for the specified table plan .
pub fn new_static(
        plan: &TablePlan,
        data: &'static mut [usize],
        store: &mut dyn Store,
    ) -> Result<Self> {
        Self::limit_new(plan, store)?;
        let size = plan.table.minimum;
        let ty = wasm_to_table_type(plan.table.wasm_ty)?;
        let data = match plan.table.maximum {
            Some(max) if (max as usize) < data.len() => &mut data[..max as usize],
            _ => data,
        };
        Ok(Table::Static { data, size, ty })
    }
pub fn new_static ( plan : & TablePlan , data : & ' static mut [ usize ] , store : & mut dyn Store , ) -> Result < Self > { Self :: limit_new ( plan , store ) ? ; let size = plan . table . minimum ; let ty = wasm_to_table_type ( plan . table . wasm_ty ) ? ; let data = match plan . table . maximum { Some ( max ) if ( max as usize ) < data . len ( ) => & mut data [ .. max as usize ] , _ => data , } ; Ok ( Table :: Static { data , size , ty } ) }
Create a new static (immovable) table instance for the specified table plan.
Create a new static ( immovable ) table instance for the specified table plan .
plan
&TablePlan
data
&'static mut [usize]
store
&mut dyn Store
plan
&TablePlan
data
&'static mut [usize]
store
&mut dyn Store