docs
This commit is contained in:
@@ -406,6 +406,12 @@ impl Table {
|
|||||||
/// Returns an error if `init` does not match the element type of the table,
|
/// Returns an error if `init` does not match the element type of the table,
|
||||||
/// or if `init` does not belong to the `store` provided.
|
/// or if `init` does not belong to the `store` provided.
|
||||||
///
|
///
|
||||||
|
/// # Panics
|
||||||
|
///
|
||||||
|
/// This function will panic when used with a [`Store`] which has a
|
||||||
|
/// [`ResourceLimiterAsync`] (see also: [`Store::limiter_async`]). When
|
||||||
|
/// using an async resource limiter, use [`Table::new_async`] instead.
|
||||||
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
@@ -570,6 +576,10 @@ impl Table {
|
|||||||
/// # Panics
|
/// # Panics
|
||||||
///
|
///
|
||||||
/// Panics if `store` does not own this table.
|
/// Panics if `store` does not own this table.
|
||||||
|
///
|
||||||
|
/// This function will panic when used with a [`Store`] which has a
|
||||||
|
/// [`ResourceLimiterAsync`] (see also: [`Store::limiter_async`]). When
|
||||||
|
/// using an async resource limiter, use [`Table::grow_async`] instead.
|
||||||
pub fn grow(&self, mut store: impl AsContextMut, delta: u32, init: Val) -> Result<u32> {
|
pub fn grow(&self, mut store: impl AsContextMut, delta: u32, init: Val) -> Result<u32> {
|
||||||
let store = store.as_context_mut().0;
|
let store = store.as_context_mut().0;
|
||||||
let ty = self.ty(&store).element().clone();
|
let ty = self.ty(&store).element().clone();
|
||||||
|
|||||||
@@ -202,6 +202,12 @@ impl Memory {
|
|||||||
/// The `store` argument will be the owner of the returned [`Memory`]. All
|
/// The `store` argument will be the owner of the returned [`Memory`]. All
|
||||||
/// WebAssembly memory is initialized to zero.
|
/// WebAssembly memory is initialized to zero.
|
||||||
///
|
///
|
||||||
|
/// # Panics
|
||||||
|
///
|
||||||
|
/// This function will panic if the [`Store`] has a
|
||||||
|
/// [`ResourceLimiterAsync`] (see also: [`Store::limiter_async`]). When
|
||||||
|
/// using an async resource limiter, use [`Memory::new_async`] instead.
|
||||||
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
@@ -459,6 +465,10 @@ impl Memory {
|
|||||||
///
|
///
|
||||||
/// Panics if this memory doesn't belong to `store`.
|
/// Panics if this memory doesn't belong to `store`.
|
||||||
///
|
///
|
||||||
|
/// This function will panic if the [`Store`] has a
|
||||||
|
/// [`ResourceLimiterAsync`] (see also: [`Store::limiter_async`]). When
|
||||||
|
/// using an async resource limiter, use [`Memory::grow_async`] instead.
|
||||||
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
|||||||
Reference in New Issue
Block a user