Trait arithmetic_typing::arith::LinearType

source ·
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§

source

fn is_linear(&self) -> bool

Returns true iff this type is linear.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl LinearType for Num

Numbers are linear, Boolean values are not.