mod ordering_private { pub trait Sealed { } }
pub trait IsntOrderingExt: ordering_private::Sealed {
#[must_use]
fn is_not_eq(self) -> bool;
#[must_use]
fn is_not_ge(self) -> bool;
#[must_use]
fn is_not_gt(self) -> bool;
#[must_use]
fn is_not_le(self) -> bool;
#[must_use]
fn is_not_lt(self) -> bool;
#[must_use]
fn is_not_ne(self) -> bool;
}
impl ordering_private::Sealed for std::cmp::Ordering { }
impl IsntOrderingExt for std::cmp::Ordering {
#[inline]
fn is_not_eq(self) -> bool {
!self.is_eq()
}
#[inline]
fn is_not_ge(self) -> bool {
!self.is_ge()
}
#[inline]
fn is_not_gt(self) -> bool {
!self.is_gt()
}
#[inline]
fn is_not_le(self) -> bool {
!self.is_le()
}
#[inline]
fn is_not_lt(self) -> bool {
!self.is_lt()
}
#[inline]
fn is_not_ne(self) -> bool {
!self.is_ne()
}
}
mod partial_eq_private { pub trait Sealed<Lhs: ?Sized, Rhs: ?Sized> { } }
pub trait IsntPartialEqExt<Lhs: ?Sized, Rhs: ?Sized>: partial_eq_private::Sealed<Lhs, Rhs>+PartialEq<Rhs> {
#[must_use]
fn not_eq(&self, other: &Rhs) -> bool;
#[must_use]
fn not_ne(&self, other: &Rhs) -> bool;
}
impl<Lhs: ?Sized, Rhs: ?Sized> partial_eq_private::Sealed<Lhs, Rhs> for Lhs where Lhs: PartialEq<Rhs> { }
impl<Lhs: ?Sized, Rhs: ?Sized> IsntPartialEqExt<Lhs, Rhs> for Lhs where Lhs: PartialEq<Rhs> {
#[inline]
fn not_eq(&self, other: &Rhs) -> bool {
!self.eq(other)
}
#[inline]
fn not_ne(&self, other: &Rhs) -> bool {
!self.ne(other)
}
}
mod partial_ord_private { pub trait Sealed<Lhs: ?Sized, Rhs: ?Sized> { } }
pub trait IsntPartialOrdExt<Lhs: ?Sized, Rhs: ?Sized>: partial_ord_private::Sealed<Lhs, Rhs>+PartialOrd<Rhs> {
#[must_use]
fn not_lt(&self, other: &Rhs) -> bool;
#[must_use]
fn not_le(&self, other: &Rhs) -> bool;
#[must_use]
fn not_gt(&self, other: &Rhs) -> bool;
#[must_use]
fn not_ge(&self, other: &Rhs) -> bool;
}
impl<Lhs: ?Sized, Rhs: ?Sized> partial_ord_private::Sealed<Lhs, Rhs> for Lhs where Lhs: PartialOrd<Rhs> { }
impl<Lhs: ?Sized, Rhs: ?Sized> IsntPartialOrdExt<Lhs, Rhs> for Lhs where Lhs: PartialOrd<Rhs> {
#[inline]
fn not_lt(&self, other: &Rhs) -> bool {
!self.lt(other)
}
#[inline]
fn not_le(&self, other: &Rhs) -> bool {
!self.le(other)
}
#[inline]
fn not_gt(&self, other: &Rhs) -> bool {
!self.gt(other)
}
#[inline]
fn not_ge(&self, other: &Rhs) -> bool {
!self.ge(other)
}
}