use anyhow::Result;
pub trait AddChecked<Rhs: ?Sized = Self> {
type Output;
fn add_checked(&self, rhs: &Rhs) -> Self::Output;
}
pub trait AddSaturating<Rhs: ?Sized = Self> {
type Output;
fn add_saturating(&self, rhs: &Rhs) -> Self::Output;
}
pub trait AddWrapped<Rhs: ?Sized = Self> {
type Output;
fn add_wrapped(&self, rhs: &Rhs) -> Self::Output;
}
pub trait DivUnchecked<Rhs: ?Sized = Self> {
type Output;
fn div_unchecked(&self, rhs: &Rhs) -> Self::Output;
}
pub trait DivChecked<Rhs: ?Sized = Self> {
type Output;
fn div_checked(&self, rhs: &Rhs) -> Self::Output;
}
pub trait DivSaturating<Rhs: ?Sized = Self> {
type Output;
fn div_saturating(&self, rhs: &Rhs) -> Self::Output;
}
pub trait DivWrapped<Rhs: ?Sized = Self> {
type Output;
fn div_wrapped(&self, rhs: &Rhs) -> Self::Output;
}
pub trait Modulo<Rhs: ?Sized = Self> {
type Output;
fn modulo(&self, rhs: &Rhs) -> Self::Output;
}
pub trait MulChecked<Rhs: ?Sized = Self> {
type Output;
fn mul_checked(&self, rhs: &Rhs) -> Self::Output;
}
pub trait MulSaturating<Rhs: ?Sized = Self> {
type Output;
fn mul_saturating(&self, rhs: &Rhs) -> Self::Output;
}
pub trait MulWrapped<Rhs: ?Sized = Self> {
type Output;
fn mul_wrapped(&self, rhs: &Rhs) -> Self::Output;
}
pub trait PowChecked<Rhs: ?Sized = Self> {
type Output;
fn pow_checked(&self, rhs: &Rhs) -> Self::Output;
}
pub trait PowWrapped<Rhs: ?Sized = Self> {
type Output;
fn pow_wrapped(&self, rhs: &Rhs) -> Self::Output;
}
pub trait RemChecked<Rhs: ?Sized = Self> {
type Output;
fn rem_checked(&self, rhs: &Rhs) -> Self::Output;
}
pub trait RemSaturating<Rhs: ?Sized = Self> {
type Output;
fn rem_saturating(&self, rhs: &Rhs) -> Self::Output;
}
pub trait RemWrapped<Rhs: ?Sized = Self> {
type Output;
fn rem_wrapped(&self, rhs: &Rhs) -> Self::Output;
}
pub trait ShlChecked<Rhs: ?Sized = Self> {
type Output;
fn shl_checked(&self, rhs: &Rhs) -> Self::Output;
}
pub trait ShlWrapped<Rhs: ?Sized = Self> {
type Output;
fn shl_wrapped(&self, rhs: &Rhs) -> Self::Output;
}
pub trait ShrChecked<Rhs: ?Sized = Self> {
type Output;
fn shr_checked(&self, rhs: &Rhs) -> Self::Output;
}
pub trait ShrWrapped<Rhs: ?Sized = Self> {
type Output;
fn shr_wrapped(&self, rhs: &Rhs) -> Self::Output;
}
pub trait SubChecked<Rhs: ?Sized = Self> {
type Output;
fn sub_checked(&self, rhs: &Rhs) -> Self::Output;
}
pub trait SubSaturating<Rhs: ?Sized = Self> {
type Output;
fn sub_saturating(&self, rhs: &Rhs) -> Self::Output;
}
pub trait SubWrapped<Rhs: ?Sized = Self> {
type Output;
fn sub_wrapped(&self, rhs: &Rhs) -> Self::Output;
}
pub trait AbsChecked {
type Output;
fn abs_checked(self) -> Self::Output;
}
pub trait AbsSaturating {
type Output;
fn abs_saturating(self) -> Self::Output;
}
pub trait AbsWrapped {
type Output;
fn abs_wrapped(self) -> Self::Output;
}
pub trait Double {
type Output;
fn double(&self) -> Self::Output;
}
pub trait Inverse {
type Output;
fn inverse(&self) -> Result<Self::Output>;
}
pub trait Square {
type Output;
fn square(&self) -> Self::Output;
}
pub trait SquareRoot {
type Output;
fn square_root(&self) -> Result<Self::Output>;
}