pub trait ArrayLike<B: Backend, T: Element>: Sized {
// Required method
fn into_array(self) -> Array<B, T>;
// Provided method
fn with_array<R>(self, f: impl FnOnce(&Array<B, T>) -> R) -> R { ... }
}Expand description
Something that can be an operand of an array operation: an array, a scalar, or a Rust value.
Required Methods§
Sourcefn into_array(self) -> Array<B, T>
fn into_array(self) -> Array<B, T>
Converts to an array.
Provided Methods§
Sourcefn with_array<R>(self, f: impl FnOnce(&Array<B, T>) -> R) -> R
fn with_array<R>(self, f: impl FnOnce(&Array<B, T>) -> R) -> R
Calls f with the array, without copying a borrowed array.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".