Trait Scalar
pub trait Scalar:
Copy
+ PartialEq
+ Debug
+ Add<Output = Self>
+ Sub<Output = Self>
+ Mul<Output = Self>
+ Div<Output = Self>
+ Neg<Output = Self>
+ Sealed {
const DOMAIN: ScalarDomain;
const STORAGE: ScalarType;
}Description
Arithmetic scalar types admitted into quantities. Ordering is a separate bound; complex quantities support equality only.
ⓘ
use eqiora_core::quantity::{Quantity, dim};
use num_complex::Complex64;
let z = Quantity::<Complex64, dim::LengthDim>::from_scalar(Complex64::new(1., 2.));
let _ = z < z;Required Associated Constants§
const DOMAIN: ScalarDomain
const DOMAIN: ScalarDomain
Mathematical domain, independent of storage precision.
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.