clippy_utils::consts

Trait IntTypeBounds

source
trait IntTypeBounds: Sized {
    type Output: PartialOrd;

    // Required methods
    fn min_max(self) -> Option<(Self::Output, Self::Output)>;
    fn bits(self) -> Self::Output;

    // Provided method
    fn ensure_fits(self, val: Self::Output) -> Option<Self::Output> { ... }
}

Required Associated Types§

Required Methods§

source

fn min_max(self) -> Option<(Self::Output, Self::Output)>

source

fn bits(self) -> Self::Output

Provided Methods§

source

fn ensure_fits(self, val: Self::Output) -> Option<Self::Output>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IntTypeBounds for IntTy

source§

type Output = i128

source§

fn min_max(self) -> Option<(Self::Output, Self::Output)>

source§

fn bits(self) -> Self::Output

source§

impl IntTypeBounds for UintTy

source§

type Output = u128

source§

fn min_max(self) -> Option<(Self::Output, Self::Output)>

source§

fn bits(self) -> Self::Output

Implementors§