pub trait ArithmeticOps<A: Clone + Copy + 'static + Send + Sync> {
// Required methods
fn add(&self, other: &Self) -> CoreResult<MemoryMappedArray<A>>
where A: Add<Output = A>;
fn sub(&self, other: &Self) -> CoreResult<MemoryMappedArray<A>>
where A: Sub<Output = A>;
fn mul(&self, other: &Self) -> CoreResult<MemoryMappedArray<A>>
where A: Mul<Output = A>;
fn div(&self, other: &Self) -> CoreResult<MemoryMappedArray<A>>
where A: Div<Output = A>;
}Expand description
Extension trait for standard arithmetic operations on memory-mapped arrays.
This trait provides implementations of standard arithmetic operations (addition, subtraction, multiplication, division) for memory-mapped arrays using the zero-copy infrastructure.
Required Methods§
Sourcefn add(&self, other: &Self) -> CoreResult<MemoryMappedArray<A>>where
A: Add<Output = A>,
fn add(&self, other: &Self) -> CoreResult<MemoryMappedArray<A>>where
A: Add<Output = A>,
Sourcefn sub(&self, other: &Self) -> CoreResult<MemoryMappedArray<A>>where
A: Sub<Output = A>,
fn sub(&self, other: &Self) -> CoreResult<MemoryMappedArray<A>>where
A: Sub<Output = A>,
Sourcefn mul(&self, other: &Self) -> CoreResult<MemoryMappedArray<A>>where
A: Mul<Output = A>,
fn mul(&self, other: &Self) -> CoreResult<MemoryMappedArray<A>>where
A: Mul<Output = A>,
Sourcefn div(&self, other: &Self) -> CoreResult<MemoryMappedArray<A>>where
A: Div<Output = A>,
fn div(&self, other: &Self) -> CoreResult<MemoryMappedArray<A>>where
A: Div<Output = A>,
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.