Trait ExtendingCast

Source
pub trait ExtendingCast<T: SimdBase>: SimdBase {
    // Required method
    fn extending_cast_from(t: T) -> Self;
}
Expand description

Lossily cast a vector by {zero,sign}-extending its values.

Required Methods§

Source

fn extending_cast_from(t: T) -> Self

Cast from one vector to another by sign or zero extending the values from the source until it fills the destination.

The lowest-index values in t are kept. Any values which don’t fit are discarded.

§Example
assert_eq!(
    U64x2::extending_cast_from(U32x4::from([1, 2, 3, 4])),
    U64x2::from([1, 2]),
);

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.

Implementors§