pub enum IntExt<Int = i32> {
Int(Int),
NegativeInf,
PositiveInf,
}Expand description
An i32 or positive/negative infinity.
§Notes on arithmetic operations:
- The result of the operation
infty + -inftyis undetermined, and if evaluated will cause a panic. - Multiplying
IntExt::PositiveInforIntExt::NegativeInfwithIntExt::I32(0)will yieldIntExt::I32(0).
Variants§
Implementations§
Trait Implementations§
Source§impl<Int> AddAssign<Int> for IntExt<Int>where
Int: AddAssign<Int>,
impl<Int> AddAssign<Int> for IntExt<Int>where
Int: AddAssign<Int>,
Source§fn add_assign(&mut self, rhs: Int)
fn add_assign(&mut self, rhs: Int)
Performs the
+= operation. Read moreSource§impl<Int: Ord> Ord for IntExt<Int>
impl<Int: Ord> Ord for IntExt<Int>
Source§impl PartialOrd<IntExt> for i32
impl PartialOrd<IntExt> for i32
Source§impl PartialOrd<i32> for IntExt
impl PartialOrd<i32> for IntExt
Source§impl PartialOrd<i64> for IntExt<i64>
impl PartialOrd<i64> for IntExt<i64>
Source§impl<Int: Ord> PartialOrd for IntExt<Int>
impl<Int: Ord> PartialOrd for IntExt<Int>
impl<Int: Copy> Copy for IntExt<Int>
impl<Int: Eq> Eq for IntExt<Int>
impl<Int> StructuralPartialEq for IntExt<Int>
Auto Trait Implementations§
impl<Int> Freeze for IntExt<Int>where
Int: Freeze,
impl<Int> RefUnwindSafe for IntExt<Int>where
Int: RefUnwindSafe,
impl<Int> Send for IntExt<Int>where
Int: Send,
impl<Int> Sync for IntExt<Int>where
Int: Sync,
impl<Int> Unpin for IntExt<Int>where
Int: Unpin,
impl<Int> UnwindSafe for IntExt<Int>where
Int: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more