Skip to main content

AsyncArray

Trait AsyncArray 

Source
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§

Source

fn async_op<F, R>(&self, op: F) -> impl Future<Output = CoreResult<R>>
where F: FnOnce(&Self) -> CoreResult<R> + Send + 'static, R: Send + 'static,

Perform an asynchronous operation on this array.

Source

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".

Implementors§