LeastElement

Trait LeastElement 

Source
pub trait LeastElement: PartialOrd + Sized {
    // Required method
    fn least() -> Self;

    // Provided method
    fn is_least(&self) -> bool { ... }
}
Expand description

A partial order with a least element (which is necessarily unique).

Required Methods§

Source

fn least() -> Self

Returns the unique least element.

For all values other of type Self, Self::least() <= other must be true.

Provided Methods§

Source

fn is_least(&self) -> bool

Returns true if and only if self is the least element.

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.

Implementations on Foreign Types§

Source§

impl LeastElement for i8

Source§

fn least() -> Self

Source§

impl LeastElement for i16

Source§

fn least() -> Self

Source§

impl LeastElement for i32

Source§

fn least() -> Self

Source§

impl LeastElement for i64

Source§

fn least() -> Self

Source§

impl LeastElement for i128

Source§

fn least() -> Self

Source§

impl LeastElement for isize

Source§

fn least() -> Self

Source§

impl LeastElement for u8

Source§

fn least() -> Self

Source§

impl LeastElement for u16

Source§

fn least() -> Self

Source§

impl LeastElement for u32

Source§

fn least() -> Self

Source§

impl LeastElement for u64

Source§

fn least() -> Self

Source§

impl LeastElement for u128

Source§

fn least() -> Self

Source§

impl LeastElement for usize

Source§

fn least() -> Self

Source§

impl<const N: usize, T> LeastElement for [T; N]
where T: LeastElement,

Source§

fn least() -> Self

Implementors§