pub trait SharedArrayExt: TypedArrayRef<Shared> {
// Provided methods
fn current_array_ref(&self) -> &ArrayRef { ... }
fn get_or_compute(
&self,
f: impl FnOnce(&ArrayRef) -> VortexResult<Canonical>,
) -> VortexResult<ArrayRef> { ... }
async fn get_or_compute_async<F, Fut>(&self, f: F) -> VortexResult<ArrayRef>
where F: FnOnce(ArrayRef) -> Fut,
Fut: Future<Output = VortexResult<Canonical>> { ... }
}Expand description
Access to the source and cached value of a shared array.
Provided Methods§
Sourcefn current_array_ref(&self) -> &ArrayRef
fn current_array_ref(&self) -> &ArrayRef
Returns the cached array, or the source before execution.
Sourcefn get_or_compute(
&self,
f: impl FnOnce(&ArrayRef) -> VortexResult<Canonical>,
) -> VortexResult<ArrayRef>
fn get_or_compute( &self, f: impl FnOnce(&ArrayRef) -> VortexResult<Canonical>, ) -> VortexResult<ArrayRef>
Computes and caches the source once, including any error.
Sourceasync fn get_or_compute_async<F, Fut>(&self, f: F) -> VortexResult<ArrayRef>
async fn get_or_compute_async<F, Fut>(&self, f: F) -> VortexResult<ArrayRef>
Computes and caches the source once across concurrent asynchronous callers.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".