pub trait AsyncArray: ArrayProtocol {
// Required methods
fn async_op<F, R>(&self, op: F) -> impl Future<Output = CoreResult<R>>
where F: FnOnce(&Self) -> CoreResult<R> + Send + 'static,
R: Send + 'static;
fn supports_async(&self) -> bool;
}
Expand description
Trait for arrays that support asynchronous operations.
Required Methods§
Sourcefn async_op<F, R>(&self, op: F) -> impl Future<Output = CoreResult<R>>
fn async_op<F, R>(&self, op: F) -> impl Future<Output = CoreResult<R>>
Perform an asynchronous operation on this array.
Sourcefn supports_async(&self) -> bool
fn supports_async(&self) -> bool
Check if this array supports asynchronous operations.
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.