pub trait AsStoreAsync {
// Required method
fn store_ref(&self) -> &StoreAsync;
// Provided methods
fn store(&self) -> StoreAsync { ... }
fn store_id(&self) -> StoreId { ... }
fn read_lock(&self) -> impl Future<Output = StoreAsyncReadLock> { ... }
fn write_lock(&self) -> impl Future<Output = StoreAsyncWriteLock> { ... }
}Expand description
A trait for types that can be used with
Function::call_async.
Required Methods§
Sourcefn store_ref(&self) -> &StoreAsync
fn store_ref(&self) -> &StoreAsync
Returns a reference to the inner store.
Provided Methods§
Sourcefn store(&self) -> StoreAsync
fn store(&self) -> StoreAsync
Returns a copy of the store.
Sourcefn read_lock(&self) -> impl Future<Output = StoreAsyncReadLock>
fn read_lock(&self) -> impl Future<Output = StoreAsyncReadLock>
Acquires a read lock on the store.
Sourcefn write_lock(&self) -> impl Future<Output = StoreAsyncWriteLock>
fn write_lock(&self) -> impl Future<Output = StoreAsyncWriteLock>
Acquires a write lock on the store.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.