rangex::basic_range

Trait StepOps

Source
pub trait StepOps:
    Num
    + PartialOrd
    + Copy
    + Debug
    + Display {
    // Required methods
    fn min() -> Self;
    fn max() -> Self;
    fn to_usize(self) -> usize;

    // Provided methods
    fn negative_one() -> Self { ... }
    fn floor(self) -> Self { ... }
    fn abs(self) -> Self { ... }
}

Required Methods§

Source

fn min() -> Self

Source

fn max() -> Self

Source

fn to_usize(self) -> usize

Provided Methods§

Source

fn negative_one() -> Self

Source

fn floor(self) -> Self

Source

fn abs(self) -> Self

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 StepOps for f32

Source§

fn min() -> Self

Source§

fn max() -> Self

Source§

fn floor(self) -> Self

Source§

fn to_usize(self) -> usize

Source§

impl StepOps for f64

Source§

fn min() -> Self

Source§

fn max() -> Self

Source§

fn floor(self) -> Self

Source§

fn to_usize(self) -> usize

Source§

impl StepOps for i8

Source§

fn min() -> Self

Source§

fn max() -> Self

Source§

fn to_usize(self) -> usize

Source§

impl StepOps for i16

Source§

fn min() -> Self

Source§

fn max() -> Self

Source§

fn to_usize(self) -> usize

Source§

impl StepOps for i32

Source§

fn min() -> Self

Source§

fn max() -> Self

Source§

fn to_usize(self) -> usize

Source§

impl StepOps for i64

Source§

fn min() -> Self

Source§

fn max() -> Self

Source§

fn to_usize(self) -> usize

Source§

impl StepOps for i128

Source§

fn min() -> Self

Source§

fn max() -> Self

Source§

fn to_usize(self) -> usize

Source§

impl StepOps for isize

Source§

fn min() -> Self

Source§

fn max() -> Self

Source§

fn to_usize(self) -> usize

Implementors§