Skip to main content

Max

Trait Max 

Source
pub trait Max: Ord {
    // Required method
    fn max() -> Self;
}
Expand description

最大元を持つ。

§Examples

use nekolib::traits::Max;

let max: i8 = Max::max();
for x in std::i8::MIN..=std::i8::MAX {
    assert!(x <= max);
}

Required Methods§

Source

fn max() -> 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 Max for bool

Source§

fn max() -> Self

Source§

impl Max for char

Source§

fn max() -> Self

Source§

impl Max for i8

Source§

fn max() -> Self

Source§

impl Max for i16

Source§

fn max() -> Self

Source§

impl Max for i32

Source§

fn max() -> Self

Source§

impl Max for i64

Source§

fn max() -> Self

Source§

impl Max for i128

Source§

fn max() -> Self

Source§

impl Max for isize

Source§

fn max() -> Self

Source§

impl Max for u8

Source§

fn max() -> Self

Source§

impl Max for u16

Source§

fn max() -> Self

Source§

impl Max for u32

Source§

fn max() -> Self

Source§

impl Max for u64

Source§

fn max() -> Self

Source§

impl Max for u128

Source§

fn max() -> Self

Source§

impl Max for ()

Source§

fn max() -> Self

Source§

impl Max for usize

Source§

fn max() -> Self

Source§

impl<A: Max> Max for (A,)

Source§

fn max() -> Self

Source§

impl<A: Max, B: Max> Max for (A, B)

Source§

fn max() -> Self

Source§

impl<A: Max, B: Max, C: Max> Max for (A, B, C)

Source§

fn max() -> Self

Source§

impl<A: Max, B: Max, C: Max, D: Max> Max for (A, B, C, D)

Source§

fn max() -> Self

Source§

impl<A: Max, B: Max, C: Max, D: Max, E: Max> Max for (A, B, C, D, E)

Source§

fn max() -> Self

Source§

impl<A: Max, B: Max, C: Max, D: Max, E: Max, F: Max> Max for (A, B, C, D, E, F)

Source§

fn max() -> Self

Source§

impl<A: Max, B: Max, C: Max, D: Max, E: Max, F: Max, G: Max> Max for (A, B, C, D, E, F, G)

Source§

fn max() -> Self

Source§

impl<A: Max, B: Max, C: Max, D: Max, E: Max, F: Max, G: Max, H: Max> Max for (A, B, C, D, E, F, G, H)

Source§

fn max() -> Self

Source§

impl<A: Max, B: Max, C: Max, D: Max, E: Max, F: Max, G: Max, H: Max, I: Max> Max for (A, B, C, D, E, F, G, H, I)

Source§

fn max() -> Self

Source§

impl<A: Max, B: Max, C: Max, D: Max, E: Max, F: Max, G: Max, H: Max, I: Max, J: Max> Max for (A, B, C, D, E, F, G, H, I, J)

Source§

fn max() -> Self

Source§

impl<A: Max, B: Max, C: Max, D: Max, E: Max, F: Max, G: Max, H: Max, I: Max, J: Max, K: Max> Max for (A, B, C, D, E, F, G, H, I, J, K)

Source§

fn max() -> Self

Source§

impl<A: Max, B: Max, C: Max, D: Max, E: Max, F: Max, G: Max, H: Max, I: Max, J: Max, K: Max, L: Max> Max for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

fn max() -> Self

Implementors§