pub trait GenericSelectable: Copy {
type SelectableMask: Copy;
// Required method
fn select<M>(mask: M, t: Self, f: Self) -> Self
where Self::SelectableMask: CastMask<M>;
}Expand description
Types whose lanes can be selected between by a mask.
Implemented by Vector (and any other lane-structured value). Given a
mask, select chooses each lane from one of two candidates.
The associated SelectableMask names the mask type
natural to this value; any mask castable to it (via CastMask) can be
used, which is what lets a comparison on one element type select lanes of
another.
Required Associated Types§
Sourcetype SelectableMask: Copy
type SelectableMask: Copy
The mask type whose lane count and layout match Self.
Required Methods§
Sourcefn select<M>(mask: M, t: Self, f: Self) -> Selfwhere
Self::SelectableMask: CastMask<M>,
fn select<M>(mask: M, t: Self, f: Self) -> Selfwhere
Self::SelectableMask: CastMask<M>,
For each lane, take the value from t where mask is true, otherwise
from f.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".