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);
}pub trait Max: Ord {
// Required method
fn max() -> Self;
}最大元を持つ。
use nekolib::traits::Max;
let max: i8 = Max::max();
for x in std::i8::MIN..=std::i8::MAX {
assert!(x <= max);
}