pub use std::ops::Add;
pub use std::ops::Sub;
pub use std::ops::Mul;
pub use std::ops::Div;
pub use std::ops::Rem;
pub use std::ops::AddAssign;
pub use std::ops::SubAssign;
pub use std::ops::MulAssign;
pub use std::ops::DivAssign;
pub use std::ops::Neg;
pub mod traits {
pub use std::ops::Add as _;
pub use std::ops::Sub as _;
pub use std::ops::Mul as _;
pub use std::ops::Div as _;
pub use std::ops::Rem as _;
pub use std::ops::AddAssign as _;
pub use std::ops::SubAssign as _;
pub use std::ops::MulAssign as _;
pub use std::ops::DivAssign as _;
pub use std::ops::Neg as _;
pub use super::HasMax as _;
pub use super::HasMin as _;
pub use super::Signum as _;
pub use super::Abs as _;
pub use super::UncheckedAdd as _;
pub use super::CheckedAdd as _;
pub use super::SaturatingAdd as _;
pub use super::UncheckedSub as _;
pub use super::CheckedSub as _;
pub use super::SaturatingSub as _;
pub use super::UncheckedMul as _;
pub use super::CheckedMul as _;
pub use super::SaturatingMul as _;
pub use super::UncheckedDiv as _;
pub use super::CheckedDiv as _;
pub use super::SaturatingDiv as _;
pub use super::Trunc as _;
pub use super::TruncTo as _;
pub use super::Floor as _;
pub use super::FloorTo as _;
pub use super::Ceil as _;
pub use super::CeilTo as _;
pub use super::Round as _;
pub use super::RoundTo as _;
pub use super::UncheckedSqrt as _;
pub use super::CheckedSqrt as _;
pub use super::UncheckedPow as _;
pub use super::CheckedPow as _;
pub use super::UncheckedLog10Floor as _;
pub use super::CheckedLog10Floor as _;
pub use super::UncheckedLn as _;
pub use super::CheckedLn as _;
}
#[cfg_attr(nightly, const_trait)]
pub trait HasMax: Sized {
const MAX: Self;
#[allow(clippy::wrong_self_convention)]
fn is_max(self) -> bool;
}
#[cfg_attr(nightly, const_trait)]
pub trait HasMin: Sized {
const MIN: Self;
#[allow(clippy::wrong_self_convention)]
fn is_min(self) -> bool;
}
#[cfg_attr(nightly, const_trait)]
pub trait Signum {
fn signum(self) -> Self;
fn signum_i128(self) -> i128;
}
#[cfg_attr(nightly, const_trait)]
pub trait Abs {
fn abs(self) -> Self;
}
#[cfg_attr(nightly, const_trait)]
pub trait UncheckedAdd<Rhs = Self> {
type Output;
fn unchecked_add(self, rhs: Rhs) -> Self::Output;
}
#[cfg_attr(nightly, const_trait)]
pub trait CheckedAdd<Rhs = Self> {
type Output;
fn checked_add(self, rhs: Rhs) -> Option<Self::Output>;
}
#[cfg_attr(nightly, const_trait)]
pub trait SaturatingAdd<Rhs = Self> {
type Output;
fn saturating_add(self, rhs: Rhs) -> Self::Output;
}
#[cfg_attr(nightly, const_trait)]
pub trait UncheckedSub<Rhs = Self> {
type Output;
fn unchecked_sub(self, rhs: Rhs) -> Self::Output;
}
#[cfg_attr(nightly, const_trait)]
pub trait CheckedSub<Rhs = Self> {
type Output;
fn checked_sub(self, rhs: Rhs) -> Option<Self::Output>;
}
#[cfg_attr(nightly, const_trait)]
pub trait SaturatingSub<Rhs = Self> {
type Output;
fn saturating_sub(self, rhs: Rhs) -> Self::Output;
}
#[cfg_attr(nightly, const_trait)]
pub trait UncheckedMul<Rhs = Self> {
type Output;
fn unchecked_mul(self, rhs: Rhs) -> Self::Output;
}
#[cfg_attr(nightly, const_trait)]
pub trait CheckedMul<Rhs = Self> {
type Output;
fn checked_mul(self, rhs: Rhs) -> Option<Self::Output>;
}
#[cfg_attr(nightly, const_trait)]
pub trait SaturatingMul<Rhs = Self> {
type Output;
fn saturating_mul(self, rhs: Rhs) -> Self::Output;
}
#[cfg_attr(nightly, const_trait)]
pub trait UncheckedDiv<Rhs = Self> {
type Output;
fn unchecked_div(self, rhs: Rhs) -> Self::Output;
}
#[cfg_attr(nightly, const_trait)]
pub trait CheckedDiv<Rhs = Self> {
type Output;
fn checked_div(self, rhs: Rhs) -> Option<Self::Output>;
}
#[cfg_attr(nightly, const_trait)]
pub trait SaturatingDiv<Rhs = Self> {
type Output;
fn saturating_div(self, rhs: Rhs) -> Self::Output;
}
#[cfg_attr(nightly, const_trait)]
pub trait Trunc {
fn trunc(self) -> Self;
}
#[cfg_attr(nightly, const_trait)]
pub trait TruncTo {
fn trunc_to(self, digits: i64) -> Self;
}
#[cfg_attr(nightly, const_trait)]
pub trait Floor {
fn floor(self) -> Self;
}
#[cfg_attr(nightly, const_trait)]
pub trait FloorTo {
fn floor_to(self, digits: i64) -> Self;
}
#[cfg_attr(nightly, const_trait)]
pub trait Ceil {
fn ceil(self) -> Self;
}
#[cfg_attr(nightly, const_trait)]
pub trait CeilTo {
fn ceil_to(self, digits: i64) -> Self;
}
#[cfg_attr(nightly, const_trait)]
pub trait Round {
fn round(self) -> Self;
}
#[cfg_attr(nightly, const_trait)]
pub trait RoundTo {
fn round_to(self, digits: i64) -> Self;
}
#[cfg_attr(nightly, const_trait)]
pub trait UncheckedSqrt {
fn unchecked_sqrt(self) -> Self;
}
#[cfg_attr(nightly, const_trait)]
pub trait CheckedSqrt: Sized {
fn checked_sqrt(self) -> Option<Self>;
}
#[cfg_attr(nightly, const_trait)]
pub trait UncheckedPow<Exp = Self> {
type Output;
fn unchecked_pow(self, exp: Exp) -> Self::Output;
}
#[cfg_attr(nightly, const_trait)]
pub trait CheckedPow<Rhs = Self> {
type Output;
fn checked_pow(self, exp: Rhs) -> Option<Self::Output>;
}
#[cfg_attr(nightly, const_trait)]
pub trait UncheckedLog10Floor {
fn unchecked_log10_floor(self) -> Self;
}
#[cfg_attr(nightly, const_trait)]
pub trait CheckedLog10Floor: Sized {
fn checked_log10_floor(self) -> Option<Self>;
}
#[cfg_attr(nightly, const_trait)]
pub trait UncheckedLn {
fn unchecked_ln(self) -> Self;
}
#[cfg_attr(nightly, const_trait)]
pub trait CheckedLn: Sized {
fn checked_ln(self) -> Option<Self>;
}