Trait Scalar

Source
pub trait Scalar:
    'static
    + Debug
    + PrimInt
    + WrappingAdd
    + WrappingSub
    + WrappingMul
    + ConstantTimeEq
    + ConditionallySelectable {
    type Signed: Scalar;
    type Unsigned: Scalar;
    type SameSign8: Scalar<Signed = i8, Unsigned = u8>;
    type SameSign16: Scalar<Signed = i16, Unsigned = u16>;
    type SameSign32: Scalar<Signed = i32, Unsigned = u32>;
    type SameSign64: Scalar<Signed = i64, Unsigned = u64>;
}
Expand description

A scalar that can live in the lane of a vector.

Required Associated Types§

Source

type Signed: Scalar

A scalar of the same width as this scalar, but signed.

Source

type Unsigned: Scalar

A scalar of the same width as this scalar, but unsigned.

Source

type SameSign8: Scalar<Signed = i8, Unsigned = u8>

A scalar of the same sign as this scalar, but with width 8.

Source

type SameSign16: Scalar<Signed = i16, Unsigned = u16>

A scalar of the same sign as this scalar, but with width 16.

Source

type SameSign32: Scalar<Signed = i32, Unsigned = u32>

A scalar of the same sign as this scalar, but with width 32.

Source

type SameSign64: Scalar<Signed = i64, Unsigned = u64>

A scalar of the same sign as this scalar, but with width 64.

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.

Implementations on Foreign Types§

Source§

impl Scalar for i8

Source§

impl Scalar for i16

Source§

impl Scalar for i32

Source§

impl Scalar for i64

Source§

impl Scalar for u8

Source§

impl Scalar for u16

Source§

impl Scalar for u32

Source§

impl Scalar for u64

Implementors§