//! Aliases for the type operators used in this crate. //! Their purpose is to increase the ergonomics of performing operations on the types defined //! here. For even more ergonomics, consider using the `op!` macro instead. //! //! For example, type `X` and type `Y` are the same here: //! //! ```rust //! # #[macro_use] extern crate typenum; //! use std::ops::Mul; //! use typenum::{Prod, P5, P7}; //! //! type X = >::Output; //! type Y = Prod; //! //! assert_type_eq!(X, Y); //! ``` // Aliases!!! use crate::type_operators::{ Abs, Cmp, Gcd, Len, Logarithm2, Max, Min, PartialDiv, Pow, SquareRoot, }; use core::ops::{Add, BitAnd, BitOr, BitXor, Div, Mul, Neg, Rem, Shl, Shr, Sub}; /// Alias for the associated type of `BitAnd`: `And = >::Output` pub type And = >::Output; /// Alias for the associated type of `BitOr`: `Or = >::Output` pub type Or = >::Output; /// Alias for the associated type of `BitXor`: `Xor = >::Output` pub type Xor = >::Output; /// Alias for the associated type of `Shl`: `Shleft = >::Output` pub type Shleft = >::Output; /// Alias for the associated type of `Shr`: `Shright = >::Output` pub type Shright = >::Output; /// Alias for the associated type of `Add`: `Sum = >::Output` pub type Sum = >::Output; /// Alias for the associated type of `Sub`: `Diff = >::Output` pub type Diff = >::Output; /// Alias for the associated type of `Mul`: `Prod = >::Output` pub type Prod = >::Output; /// Alias for the associated type of `Div`: `Quot = >::Output` pub type Quot = >::Output; /// Alias for the associated type of `Rem`: `Mod = >::Output` pub type Mod = >::Output; /// Alias for the associated type of /// `PartialDiv`: `PartialQuot = >::Output` pub type PartialQuot = >::Output; /// Alias for the associated type of `Neg`: `Negate = ::Output` pub type Negate = ::Output; /// Alias for the associated type of `Abs`: `AbsVal = ::Output` pub type AbsVal = ::Output; /// Alias for the associated type of `Pow`: `Exp = >::Output` pub type Exp = >::Output; /// Alias for the associated type of `Gcd`: `Gcf = >::Output>` pub type Gcf = >::Output; /// Alias to make it easy to add 1: `Add1 = >::Output` pub type Add1 = >::Output; /// Alias to make it easy to subtract 1: `Sub1 = >::Output` pub type Sub1 = >::Output; /// Alias to make it easy to multiply by 2. `Double = Shleft` pub type Double = Shleft; /// Alias to make it easy to square. `Square = >::Output` pub type Square = ::Output; /// Alias to make it easy to cube. `Cube = as Mul>::Output` pub type Cube = as Mul>::Output; /// Alias for the associated type of `SquareRoot`: `Sqrt = ::Output` pub type Sqrt = ::Output; /// Alias for the associated type of `Cmp`: `Compare = >::Output` pub type Compare = >::Output; /// Alias for the associated type of `Len`: `Length = ::Output` pub type Length = ::Output; /// Alias for the associated type of `Min`: `Minimum = >::Output` pub type Minimum = >::Output; /// Alias for the associated type of `Max`: `Maximum = >::Output` pub type Maximum = >::Output; use crate::type_operators::{ IsEqual, IsGreater, IsGreaterOrEqual, IsLess, IsLessOrEqual, IsNotEqual, }; /// Alias for the associated type of `IsLess`: `Le = >::Output` pub type Le = >::Output; /// Alias for the associated type of `IsEqual`: `Eq = >::Output` pub type Eq = >::Output; /// Alias for the associated type of `IsGreater`: `Gr = >::Output` pub type Gr = >::Output; /// Alias for the associated type of `IsGreaterOrEqual`: /// `GrEq = >::Output` pub type GrEq = >::Output; /// Alias for the associated type of `IsLessOrEqual`: `LeEq = >::Output` pub type LeEq = >::Output; /// Alias for the associated type of `IsNotEqual`: `NotEq = >::Output` pub type NotEq = >::Output; /// Alias for the associated type of `Logarithm2`: `Log2 = ::Output` pub type Log2 = ::Output;