num_traits::bounds

Trait Bounded

Source
pub trait Bounded {
    // Required methods
    fn min_value() -> Self;
    fn max_value() -> Self;
}
Expand description

Numbers which have upper and lower bounds

Required Methods§

Source

fn min_value() -> Self

Returns the smallest finite number this type can represent

Source

fn max_value() -> Self

Returns the largest finite number this type can represent

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 Bounded for ()

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl Bounded for f32

Source§

fn min_value() -> f32

Source§

fn max_value() -> f32

Source§

impl Bounded for f64

Source§

fn min_value() -> f64

Source§

fn max_value() -> f64

Source§

impl Bounded for i8

Source§

impl Bounded for i16

Source§

fn min_value() -> i16

Source§

fn max_value() -> i16

Source§

impl Bounded for i32

Source§

fn min_value() -> i32

Source§

fn max_value() -> i32

Source§

impl Bounded for i64

Source§

fn min_value() -> i64

Source§

fn max_value() -> i64

Source§

impl Bounded for i128

Source§

fn min_value() -> i128

Source§

fn max_value() -> i128

Source§

impl Bounded for isize

Source§

fn min_value() -> isize

Source§

fn max_value() -> isize

Source§

impl Bounded for u8

Source§

impl Bounded for u16

Source§

fn min_value() -> u16

Source§

fn max_value() -> u16

Source§

impl Bounded for u32

Source§

fn min_value() -> u32

Source§

fn max_value() -> u32

Source§

impl Bounded for u64

Source§

fn min_value() -> u64

Source§

fn max_value() -> u64

Source§

impl Bounded for u128

Source§

fn min_value() -> u128

Source§

fn max_value() -> u128

Source§

impl Bounded for usize

Source§

fn min_value() -> usize

Source§

fn max_value() -> usize

Source§

impl<A: Bounded, B: Bounded, C: Bounded, D: Bounded, E: Bounded, F: Bounded, G: Bounded, H: Bounded, I: Bounded, J: Bounded, K: Bounded, L: Bounded, M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<B: Bounded, C: Bounded, D: Bounded, E: Bounded, F: Bounded, G: Bounded, H: Bounded, I: Bounded, J: Bounded, K: Bounded, L: Bounded, M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<C: Bounded, D: Bounded, E: Bounded, F: Bounded, G: Bounded, H: Bounded, I: Bounded, J: Bounded, K: Bounded, L: Bounded, M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<D: Bounded, E: Bounded, F: Bounded, G: Bounded, H: Bounded, I: Bounded, J: Bounded, K: Bounded, L: Bounded, M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<E: Bounded, F: Bounded, G: Bounded, H: Bounded, I: Bounded, J: Bounded, K: Bounded, L: Bounded, M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<F: Bounded, G: Bounded, H: Bounded, I: Bounded, J: Bounded, K: Bounded, L: Bounded, M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<G: Bounded, H: Bounded, I: Bounded, J: Bounded, K: Bounded, L: Bounded, M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (G, H, I, J, K, L, M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<H: Bounded, I: Bounded, J: Bounded, K: Bounded, L: Bounded, M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (H, I, J, K, L, M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<I: Bounded, J: Bounded, K: Bounded, L: Bounded, M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (I, J, K, L, M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<J: Bounded, K: Bounded, L: Bounded, M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (J, K, L, M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<K: Bounded, L: Bounded, M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (K, L, M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<L: Bounded, M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (L, M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<M: Bounded, N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (M, N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<N: Bounded, O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (N, O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<O: Bounded, P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (O, P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<P: Bounded, Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (P, Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<Q: Bounded, R: Bounded, S: Bounded, T: Bounded> Bounded for (Q, R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<R: Bounded, S: Bounded, T: Bounded> Bounded for (R, S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<S: Bounded, T: Bounded> Bounded for (S, T)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<T: Bounded> Bounded for (T,)

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Source§

impl<T: Bounded> Bounded for Wrapping<T>

Source§

fn min_value() -> Self

Source§

fn max_value() -> Self

Implementors§