Skip to main content

ScalarOperand

Trait ScalarOperand 

Source
pub trait ScalarOperand: Into<Scalar> { }
Expand description

A Rust number usable as a weak operand of + - * / on the right of an array.

Implemented for bool, every integer type, f16, bf16, f32, f64 and Complex64; a single generic operator impl over this trait lets literals such as 2.0 and 1 keep their usual defaults.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl ScalarOperand for bool

Source§

impl ScalarOperand for f32

Source§

impl ScalarOperand for f64

Source§

impl ScalarOperand for i8

Source§

impl ScalarOperand for i16

Source§

impl ScalarOperand for i32

Source§

impl ScalarOperand for i64

Source§

impl ScalarOperand for u8

Source§

impl ScalarOperand for u16

Source§

impl ScalarOperand for u32

Source§

impl ScalarOperand for u64

Implementors§