Variant

Trait Variant 

Source
pub trait Variant: SemiArithmetic {
    type ValueType: SemiArithmetic;

    // Required method
    fn equiv(&self, rhs: &Self::ValueType) -> bool;

    // Provided method
    fn value(&self) -> Option<&Self::ValueType> { ... }
}

Required Associated Types§

Required Methods§

Source

fn equiv(&self, rhs: &Self::ValueType) -> bool

Provided Methods§

Source

fn value(&self) -> Option<&Self::ValueType>

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§