pub trait Sealed {
    const TRUE: Self;
    const FALSE: Self;

    // Required methods
    fn valid<const LANES: usize>(values: Simd<Self, LANES>) -> bool
       where LaneCount<LANES>: SupportedLaneCount,
             Self: SimdElement;
    fn eq(self, other: Self) -> bool;
}
🔬This is a nightly-only experimental API. (portable_simd #86656)
Expand description

Not only does this seal the MaskElement trait, but these functions prevent other traits from bleeding into the parent bounds.

For example, eq could be provided by requiring MaskElement: PartialEq, but that would prevent us from ever removing that bound, or from implementing MaskElement on non-PartialEq types in the future.

Required Associated Constants§

source

const TRUE: Self

🔬This is a nightly-only experimental API. (portable_simd #86656)
source

const FALSE: Self

🔬This is a nightly-only experimental API. (portable_simd #86656)

Required Methods§

source

fn valid<const LANES: usize>(values: Simd<Self, LANES>) -> boolwhere LaneCount<LANES>: SupportedLaneCount, Self: SimdElement,

🔬This is a nightly-only experimental API. (portable_simd #86656)
source

fn eq(self, other: Self) -> bool

🔬This is a nightly-only experimental API. (portable_simd #86656)

Implementors§

source§

impl Sealed for i8

source§

const TRUE: Self = -1i8

source§

const FALSE: Self = 0i8

source§

impl Sealed for i16

source§

const TRUE: Self = -1i16

source§

const FALSE: Self = 0i16

source§

impl Sealed for i32

source§

const TRUE: Self = -1i32

source§

const FALSE: Self = 0i32

source§

impl Sealed for i64

source§

const TRUE: Self = -1i64

source§

const FALSE: Self = 0i64

source§

impl Sealed for isize

source§

const TRUE: Self = -1isize

source§

const FALSE: Self = 0isize