Skip to main content

_ArrayOps

Trait _ArrayOps 

Source
pub trait _ArrayOps { }
Expand description

A marker trait for types that can be used as an array Users should not implement this directly, rather they should use the ArrayOps derive macro by passing it as an argument to the crate::active_messaging::AmData attribute macro to automatically derive this trait.

§Examples

// this import includes everything we need
use lamellar::array::prelude::*;


#[lamellar::AmData(
    // Lamellar traits
    ArrayOps, // needed to derive the ArrayType trait (and additional traits required by the runtime)
    Default,       // needed to be able to initialize a LamellarArray
    //  Notice we use `lamellar::AmData` instead of `derive`
    //  for common traits, e.g. Debug, Clone.    
    PartialEq,     // needed for CompareExchangeEpsilonOps
    PartialOrd,    // needed for CompareExchangeEpsilonOps
    Debug,         // any addition traits you want derived
    Clone,
)]
struct Custom {
    int: usize,
    float: f32,
}

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ArrayOps for bool

Source§

impl ArrayOps for f32

Source§

impl ArrayOps for f64

Source§

impl ArrayOps for i8

Source§

impl ArrayOps for i16

Source§

impl ArrayOps for i32

Source§

impl ArrayOps for i64

Source§

impl ArrayOps for i128

Source§

impl ArrayOps for isize

Source§

impl ArrayOps for u8

Source§

impl ArrayOps for u16

Source§

impl ArrayOps for u32

Source§

impl ArrayOps for u64

Source§

impl ArrayOps for u128

Source§

impl ArrayOps for usize

Source§

impl<T: Dist + ArrayOps> ArrayOps for Option<T>

Implementors§