isnt/std_1/
cmp.rs

1// This file was generated
2
3mod partial_eq_private { pub trait Sealed<Lhs: ?Sized, Rhs: ?Sized> { } }
4
5/// Extension for [`PartialEq`](std::cmp::PartialEq)
6pub trait IsntPartialEqExt<Lhs: ?Sized, Rhs: ?Sized>: partial_eq_private::Sealed<Lhs, Rhs>+std::cmp::PartialEq<Rhs> {
7    /// The negation of [`eq`](std::cmp::PartialEq::eq)
8    #[must_use]
9    fn not_eq(&self, other: &Rhs) -> bool;
10    /// The negation of [`ne`](std::cmp::PartialEq::ne)
11    #[must_use]
12    fn not_ne(&self, other: &Rhs) -> bool;
13}
14
15impl<Lhs: ?Sized, Rhs: ?Sized> partial_eq_private::Sealed<Lhs, Rhs> for Lhs where Lhs: std::cmp::PartialEq<Rhs> { }
16
17impl<Lhs: ?Sized, Rhs: ?Sized> IsntPartialEqExt<Lhs, Rhs> for Lhs where Lhs: std::cmp::PartialEq<Rhs> {
18    #[inline]
19    fn not_eq(&self, other: &Rhs) -> bool {
20        !self.eq(other)
21    }
22
23    #[inline]
24    fn not_ne(&self, other: &Rhs) -> bool {
25        !self.ne(other)
26    }
27}
28
29mod partial_ord_private { pub trait Sealed<Lhs: ?Sized, Rhs: ?Sized> { } }
30
31/// Extension for [`PartialOrd`](std::cmp::PartialOrd)
32pub trait IsntPartialOrdExt<Lhs: ?Sized, Rhs: ?Sized>: partial_ord_private::Sealed<Lhs, Rhs>+std::cmp::PartialOrd<Rhs> {
33    /// The negation of [`lt`](std::cmp::PartialOrd::lt)
34    #[must_use]
35    fn not_lt(&self, other: &Rhs) -> bool;
36    /// The negation of [`le`](std::cmp::PartialOrd::le)
37    #[must_use]
38    fn not_le(&self, other: &Rhs) -> bool;
39    /// The negation of [`gt`](std::cmp::PartialOrd::gt)
40    #[must_use]
41    fn not_gt(&self, other: &Rhs) -> bool;
42    /// The negation of [`ge`](std::cmp::PartialOrd::ge)
43    #[must_use]
44    fn not_ge(&self, other: &Rhs) -> bool;
45}
46
47impl<Lhs: ?Sized, Rhs: ?Sized> partial_ord_private::Sealed<Lhs, Rhs> for Lhs where Lhs: std::cmp::PartialOrd<Rhs> { }
48
49impl<Lhs: ?Sized, Rhs: ?Sized> IsntPartialOrdExt<Lhs, Rhs> for Lhs where Lhs: std::cmp::PartialOrd<Rhs> {
50    #[inline]
51    fn not_lt(&self, other: &Rhs) -> bool {
52        !self.lt(other)
53    }
54
55    #[inline]
56    fn not_le(&self, other: &Rhs) -> bool {
57        !self.le(other)
58    }
59
60    #[inline]
61    fn not_gt(&self, other: &Rhs) -> bool {
62        !self.gt(other)
63    }
64
65    #[inline]
66    fn not_ge(&self, other: &Rhs) -> bool {
67        !self.ge(other)
68    }
69}