docs
This commit is contained in:
@@ -533,12 +533,24 @@ impl<T> Store<T> {
|
||||
inner.limiter = Some(ResourceLimiterInner::Sync(Box::new(limiter)));
|
||||
}
|
||||
|
||||
/// Configures the [`ResourceLimiterAsync`](crate::ResourceLimiterAsync) used to limit
|
||||
/// resource creation within this [`Store`]. Must be used with an async `Store`!.
|
||||
/// Configures the [`ResourceLimiterAsync`](crate::ResourceLimiterAsync)
|
||||
/// used to limit resource creation within this [`Store`]. Must be used
|
||||
/// with an async `Store`!.
|
||||
///
|
||||
/// Note that this limiter is only used to limit the creation/growth of
|
||||
/// resources in the future, this does not retroactively attempt to apply
|
||||
/// limits to the [`Store`].
|
||||
///
|
||||
/// This variation on the [`ResourceLimiter`] makes the `memory_growing`
|
||||
/// and `table_growing` functions `async`. This means that, as part of
|
||||
/// your resource limiting strategy, the async resource limiter may yield
|
||||
/// execution until a resource becomes available.
|
||||
///
|
||||
/// By using a [`ResourceLimiterAsync`] with a [`Store`], you can no
|
||||
/// longer use [`Memory::new`], [`Memory::grow`], [`Table::new`], and
|
||||
/// [`Table::grow`]. Instead, you must use their `async` variants:
|
||||
/// [`Memory::new_async`], [`Memory::grow_async`], [`Table::new_async`],
|
||||
/// and [`Table::grow_async`].
|
||||
#[cfg(feature = "async")]
|
||||
pub fn limiter_async(
|
||||
&mut self,
|
||||
|
||||
Reference in New Issue
Block a user