malachite_base/comparison/
traits.rs

1// Copyright © 2025 Mikhail Hogrefe
2//
3// This file is part of Malachite.
4//
5// Malachite is free software: you can redistribute it and/or modify it under the terms of the GNU
6// Lesser General Public License (LGPL) as published by the Free Software Foundation; either version
7// 3 of the License, or (at your option) any later version. See <https://www.gnu.org/licenses/>.
8
9/// Defines the minimum value of a type.
10#[allow(clippy::declare_interior_mutable_const)]
11pub trait Min {
12    /// The minimum value of `Self`.
13    const MIN: Self;
14}
15
16/// Defines the maximum value of a type.
17#[allow(clippy::declare_interior_mutable_const)]
18pub trait Max {
19    /// The maximum value of `Self`.
20    const MAX: Self;
21}