| 1 | struct SDiff< |
| 2 | '__daft, |
| 3 | 'a: '__daft, |
| 4 | 'b: '__daft, |
| 5 | 'daft: 'a + '__daft, |
| 6 | 'inv: '__daft, |
| 7 | 'contra: '__daft, |
| 8 | > { |
| 9 | multi_ref: <&'a &'b Vec<u8> as ::daft::Diffable>::Diff<'__daft>, |
| 10 | bound_ref: <&'daft Vec<u8> as ::daft::Diffable>::Diff<'__daft>, |
| 11 | inv_ref: <PhantomData<Cell<&'inv ()>> as ::daft::Diffable>::Diff<'__daft>, |
| 12 | contra_ref: <PhantomData<fn(&'contra ())> as ::daft::Diffable>::Diff<'__daft>, |
| 13 | } |
| 14 | impl< |
| 15 | '__daft, |
| 16 | 'a: '__daft, |
| 17 | 'b: '__daft, |
| 18 | 'daft: 'a + '__daft, |
| 19 | 'inv: '__daft, |
| 20 | 'contra: '__daft, |
| 21 | > ::core::fmt::Debug for SDiff<'__daft, 'a, 'b, 'daft, 'inv, 'contra> |
| 22 | where |
| 23 | <&'a &'b Vec<u8> as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug, |
| 24 | <&'daft Vec<u8> as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug, |
| 25 | <PhantomData<Cell<&'inv ()>> as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug, |
| 26 | <PhantomData< |
| 27 | fn(&'contra ()), |
| 28 | > as ::daft::Diffable>::Diff<'__daft>: ::core::fmt::Debug, |
| 29 | { |
| 30 | fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| 31 | f.debug_struct(stringify!(SDiff)) |
| 32 | .field(stringify!(multi_ref), &self.multi_ref) |
| 33 | .field(stringify!(bound_ref), &self.bound_ref) |
| 34 | .field(stringify!(inv_ref), &self.inv_ref) |
| 35 | .field(stringify!(contra_ref), &self.contra_ref) |
| 36 | .finish() |
| 37 | } |
| 38 | } |
| 39 | impl< |
| 40 | '__daft, |
| 41 | 'a: '__daft, |
| 42 | 'b: '__daft, |
| 43 | 'daft: 'a + '__daft, |
| 44 | 'inv: '__daft, |
| 45 | 'contra: '__daft, |
| 46 | > ::core::cmp::PartialEq for SDiff<'__daft, 'a, 'b, 'daft, 'inv, 'contra> |
| 47 | where |
| 48 | <&'a &'b Vec<u8> as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq, |
| 49 | <&'daft Vec<u8> as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq, |
| 50 | <PhantomData< |
| 51 | Cell<&'inv ()>, |
| 52 | > as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq, |
| 53 | <PhantomData< |
| 54 | fn(&'contra ()), |
| 55 | > as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::PartialEq, |
| 56 | { |
| 57 | fn eq(&self, other: &Self) -> bool { |
| 58 | self.multi_ref == other.multi_ref && self.bound_ref == other.bound_ref |
| 59 | && self.inv_ref == other.inv_ref && self.contra_ref == other.contra_ref |
| 60 | } |
| 61 | } |
| 62 | impl< |
| 63 | '__daft, |
| 64 | 'a: '__daft, |
| 65 | 'b: '__daft, |
| 66 | 'daft: 'a + '__daft, |
| 67 | 'inv: '__daft, |
| 68 | 'contra: '__daft, |
| 69 | > ::core::cmp::Eq for SDiff<'__daft, 'a, 'b, 'daft, 'inv, 'contra> |
| 70 | where |
| 71 | <&'a &'b Vec<u8> as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq, |
| 72 | <&'daft Vec<u8> as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq, |
| 73 | <PhantomData<Cell<&'inv ()>> as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq, |
| 74 | <PhantomData<fn(&'contra ())> as ::daft::Diffable>::Diff<'__daft>: ::core::cmp::Eq, |
| 75 | {} |
| 76 | impl<'a, 'b, 'daft: 'a, 'inv, 'contra> ::daft::Diffable |
| 77 | for S<'a, 'b, 'daft, 'inv, 'contra> { |
| 78 | type Diff<'__daft> = SDiff<'__daft, 'a, 'b, 'daft, 'inv, 'contra> |
| 79 | where |
| 80 | Self: '__daft; |
| 81 | fn diff<'__daft>( |
| 82 | &'__daft self, |
| 83 | other: &'__daft Self, |
| 84 | ) -> SDiff<'__daft, 'a, 'b, 'daft, 'inv, 'contra> { |
| 85 | Self::Diff { |
| 86 | multi_ref: ::daft::Diffable::diff(&self.multi_ref, &other.multi_ref), |
| 87 | bound_ref: ::daft::Diffable::diff(&self.bound_ref, &other.bound_ref), |
| 88 | inv_ref: ::daft::Diffable::diff(&self.inv_ref, &other.inv_ref), |
| 89 | contra_ref: ::daft::Diffable::diff(&self.contra_ref, &other.contra_ref), |
| 90 | } |
| 91 | } |
| 92 | } |