pub trait LinearType: PrimitiveType {
// Required method
fn is_linear(&self) -> bool;
}
Expand description
Primitive type which supports a notion of linearity. Linear types are types that can be used in arithmetic ops.
Required Methods§
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§
impl LinearType for Num
Num
bers are linear, Bool
ean values are not.