aint/
shifts.rs

1use crate::sealed::Sealed;
2use crate::Aint;
3
4impl<R: Sealed, const WIDTH: u32> core::ops::Shl<u8> for Aint<R, WIDTH> {
5    type Output = Self;
6
7    fn shl(self, rhs: u8) -> Self {
8        debug_assert!((rhs as u32) < WIDTH, "attempt to shift left with overflow");
9        Self::_new_wrapping(self.0 << rhs)
10    }
11}
12
13impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&u8> for Aint<R, WIDTH> {
14    type Output = Self;
15
16    fn shl(self, rhs: &u8) -> Self {
17        self << *rhs
18    }
19}
20
21impl<R: Sealed, const WIDTH: u32> core::ops::Shl<u8> for &Aint<R, WIDTH> {
22    type Output = Aint<R, WIDTH>;
23
24    fn shl(self, rhs: u8) -> Self::Output {
25        *self << rhs
26    }
27}
28
29impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b u8> for &'a Aint<R, WIDTH> {
30    type Output = Aint<R, WIDTH>;
31
32    fn shl(self, rhs: &'b u8) -> Self::Output {
33        *self << *rhs
34    }
35}
36
37impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<u8> for Aint<R, WIDTH> {
38    fn shl_assign(&mut self, rhs: u8) {
39        *self = *self << rhs;
40    }
41}
42
43impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&u8> for Aint<R, WIDTH> {
44    fn shl_assign(&mut self, rhs: &u8) {
45        *self = *self << *rhs;
46    }
47}
48
49impl<R: Sealed, const WIDTH: u32> core::ops::Shl<u16> for Aint<R, WIDTH> {
50    type Output = Self;
51
52    fn shl(self, rhs: u16) -> Self {
53        debug_assert!((rhs as u32) < WIDTH, "attempt to shift left with overflow");
54        Self::_new_wrapping(self.0 << rhs)
55    }
56}
57
58impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&u16> for Aint<R, WIDTH> {
59    type Output = Self;
60
61    fn shl(self, rhs: &u16) -> Self {
62        self << *rhs
63    }
64}
65
66impl<R: Sealed, const WIDTH: u32> core::ops::Shl<u16> for &Aint<R, WIDTH> {
67    type Output = Aint<R, WIDTH>;
68
69    fn shl(self, rhs: u16) -> Self::Output {
70        *self << rhs
71    }
72}
73
74impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b u16> for &'a Aint<R, WIDTH> {
75    type Output = Aint<R, WIDTH>;
76
77    fn shl(self, rhs: &'b u16) -> Self::Output {
78        *self << *rhs
79    }
80}
81
82impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<u16> for Aint<R, WIDTH> {
83    fn shl_assign(&mut self, rhs: u16) {
84        *self = *self << rhs;
85    }
86}
87
88impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&u16> for Aint<R, WIDTH> {
89    fn shl_assign(&mut self, rhs: &u16) {
90        *self = *self << *rhs;
91    }
92}
93
94impl<R: Sealed, const WIDTH: u32> core::ops::Shl<u32> for Aint<R, WIDTH> {
95    type Output = Self;
96
97    fn shl(self, rhs: u32) -> Self {
98        debug_assert!(rhs < WIDTH, "attempt to shift left with overflow");
99        Self::_new_wrapping(self.0 << rhs)
100    }
101}
102
103impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&u32> for Aint<R, WIDTH> {
104    type Output = Self;
105
106    fn shl(self, rhs: &u32) -> Self {
107        self << *rhs
108    }
109}
110
111impl<R: Sealed, const WIDTH: u32> core::ops::Shl<u32> for &Aint<R, WIDTH> {
112    type Output = Aint<R, WIDTH>;
113
114    fn shl(self, rhs: u32) -> Self::Output {
115        *self << rhs
116    }
117}
118
119impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b u32> for &'a Aint<R, WIDTH> {
120    type Output = Aint<R, WIDTH>;
121
122    fn shl(self, rhs: &'b u32) -> Self::Output {
123        *self << *rhs
124    }
125}
126
127impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<u32> for Aint<R, WIDTH> {
128    fn shl_assign(&mut self, rhs: u32) {
129        *self = *self << rhs;
130    }
131}
132
133impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&u32> for Aint<R, WIDTH> {
134    fn shl_assign(&mut self, rhs: &u32) {
135        *self = *self << *rhs;
136    }
137}
138
139impl<R: Sealed, const WIDTH: u32> core::ops::Shl<u64> for Aint<R, WIDTH> {
140    type Output = Self;
141
142    fn shl(self, rhs: u64) -> Self {
143        debug_assert!(rhs < WIDTH as u64, "attempt to shift left with overflow");
144        Self::_new_wrapping(self.0 << rhs)
145    }
146}
147
148impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&u64> for Aint<R, WIDTH> {
149    type Output = Self;
150
151    fn shl(self, rhs: &u64) -> Self {
152        self << *rhs
153    }
154}
155
156impl<R: Sealed, const WIDTH: u32> core::ops::Shl<u64> for &Aint<R, WIDTH> {
157    type Output = Aint<R, WIDTH>;
158
159    fn shl(self, rhs: u64) -> Self::Output {
160        *self << rhs
161    }
162}
163
164impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b u64> for &'a Aint<R, WIDTH> {
165    type Output = Aint<R, WIDTH>;
166
167    fn shl(self, rhs: &'b u64) -> Self::Output {
168        *self << *rhs
169    }
170}
171
172impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<u64> for Aint<R, WIDTH> {
173    fn shl_assign(&mut self, rhs: u64) {
174        *self = *self << rhs;
175    }
176}
177
178impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&u64> for Aint<R, WIDTH> {
179    fn shl_assign(&mut self, rhs: &u64) {
180        *self = *self << *rhs;
181    }
182}
183
184impl<R: Sealed, const WIDTH: u32> core::ops::Shl<u128> for Aint<R, WIDTH> {
185    type Output = Self;
186
187    fn shl(self, rhs: u128) -> Self {
188        debug_assert!(rhs < WIDTH as u128, "attempt to shift left with overflow");
189        Self::_new_wrapping(self.0 << rhs)
190    }
191}
192
193impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&u128> for Aint<R, WIDTH> {
194    type Output = Self;
195
196    fn shl(self, rhs: &u128) -> Self {
197        self << *rhs
198    }
199}
200
201impl<R: Sealed, const WIDTH: u32> core::ops::Shl<u128> for &Aint<R, WIDTH> {
202    type Output = Aint<R, WIDTH>;
203
204    fn shl(self, rhs: u128) -> Self::Output {
205        *self << rhs
206    }
207}
208
209impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b u128> for &'a Aint<R, WIDTH> {
210    type Output = Aint<R, WIDTH>;
211
212    fn shl(self, rhs: &'b u128) -> Self::Output {
213        *self << *rhs
214    }
215}
216
217impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<u128> for Aint<R, WIDTH> {
218    fn shl_assign(&mut self, rhs: u128) {
219        *self = *self << rhs;
220    }
221}
222
223impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&u128> for Aint<R, WIDTH> {
224    fn shl_assign(&mut self, rhs: &u128) {
225        *self = *self << *rhs;
226    }
227}
228
229impl<R: Sealed, const WIDTH: u32> core::ops::Shl<usize> for Aint<R, WIDTH> {
230    type Output = Self;
231
232    fn shl(self, rhs: usize) -> Self {
233        debug_assert!(rhs < WIDTH as usize, "attempt to shift left with overflow");
234        Self::_new_wrapping(self.0 << rhs)
235    }
236}
237
238impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&usize> for Aint<R, WIDTH> {
239    type Output = Self;
240
241    fn shl(self, rhs: &usize) -> Self {
242        self << *rhs
243    }
244}
245
246impl<R: Sealed, const WIDTH: u32> core::ops::Shl<usize> for &Aint<R, WIDTH> {
247    type Output = Aint<R, WIDTH>;
248
249    fn shl(self, rhs: usize) -> Self::Output {
250        *self << rhs
251    }
252}
253
254impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b usize> for &'a Aint<R, WIDTH> {
255    type Output = Aint<R, WIDTH>;
256
257    fn shl(self, rhs: &'b usize) -> Self::Output {
258        *self << *rhs
259    }
260}
261
262impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<usize> for Aint<R, WIDTH> {
263    fn shl_assign(&mut self, rhs: usize) {
264        *self = *self << rhs;
265    }
266}
267
268impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&usize> for Aint<R, WIDTH> {
269    fn shl_assign(&mut self, rhs: &usize) {
270        *self = *self << *rhs;
271    }
272}
273
274impl<R: Sealed, const WIDTH: u32> core::ops::Shl<i8> for Aint<R, WIDTH> {
275    type Output = Self;
276
277    fn shl(self, rhs: i8) -> Self {
278        debug_assert!(
279            (rhs as i64) < (WIDTH as i64) && (rhs as i64) > -(WIDTH as i64),
280            "attempt to shift left with overflow"
281        );
282        Self::_new_wrapping(self.0 << rhs)
283    }
284}
285
286impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&i8> for Aint<R, WIDTH> {
287    type Output = Self;
288
289    fn shl(self, rhs: &i8) -> Self {
290        self << *rhs
291    }
292}
293
294impl<R: Sealed, const WIDTH: u32> core::ops::Shl<i8> for &Aint<R, WIDTH> {
295    type Output = Aint<R, WIDTH>;
296
297    fn shl(self, rhs: i8) -> Self::Output {
298        *self << rhs
299    }
300}
301
302impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b i8> for &'a Aint<R, WIDTH> {
303    type Output = Aint<R, WIDTH>;
304
305    fn shl(self, rhs: &'b i8) -> Self::Output {
306        *self << *rhs
307    }
308}
309
310impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<i8> for Aint<R, WIDTH> {
311    fn shl_assign(&mut self, rhs: i8) {
312        *self = *self << rhs;
313    }
314}
315
316impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&i8> for Aint<R, WIDTH> {
317    fn shl_assign(&mut self, rhs: &i8) {
318        *self = *self << *rhs;
319    }
320}
321
322impl<R: Sealed, const WIDTH: u32> core::ops::Shl<i16> for Aint<R, WIDTH> {
323    type Output = Self;
324
325    fn shl(self, rhs: i16) -> Self {
326        debug_assert!(
327            (rhs as i64) < (WIDTH as i64) && (rhs as i64) > -(WIDTH as i64),
328            "attempt to shift left with overflow"
329        );
330        Self::_new_wrapping(self.0 << rhs)
331    }
332}
333
334impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&i16> for Aint<R, WIDTH> {
335    type Output = Self;
336
337    fn shl(self, rhs: &i16) -> Self {
338        self << *rhs
339    }
340}
341
342impl<R: Sealed, const WIDTH: u32> core::ops::Shl<i16> for &Aint<R, WIDTH> {
343    type Output = Aint<R, WIDTH>;
344
345    fn shl(self, rhs: i16) -> Self::Output {
346        *self << rhs
347    }
348}
349
350impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b i16> for &'a Aint<R, WIDTH> {
351    type Output = Aint<R, WIDTH>;
352
353    fn shl(self, rhs: &'b i16) -> Self::Output {
354        *self << *rhs
355    }
356}
357
358impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<i16> for Aint<R, WIDTH> {
359    fn shl_assign(&mut self, rhs: i16) {
360        *self = *self << rhs;
361    }
362}
363
364impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&i16> for Aint<R, WIDTH> {
365    fn shl_assign(&mut self, rhs: &i16) {
366        *self = *self << *rhs;
367    }
368}
369
370impl<R: Sealed, const WIDTH: u32> core::ops::Shl<i32> for Aint<R, WIDTH> {
371    type Output = Self;
372
373    fn shl(self, rhs: i32) -> Self {
374        debug_assert!(
375            (rhs as i64) < (WIDTH as i64) && (rhs as i64) > -(WIDTH as i64),
376            "attempt to shift left with overflow"
377        );
378        Self::_new_wrapping(self.0 << rhs)
379    }
380}
381
382impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&i32> for Aint<R, WIDTH> {
383    type Output = Self;
384
385    fn shl(self, rhs: &i32) -> Self {
386        self << *rhs
387    }
388}
389
390impl<R: Sealed, const WIDTH: u32> core::ops::Shl<i32> for &Aint<R, WIDTH> {
391    type Output = Aint<R, WIDTH>;
392
393    fn shl(self, rhs: i32) -> Self::Output {
394        *self << rhs
395    }
396}
397
398impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b i32> for &'a Aint<R, WIDTH> {
399    type Output = Aint<R, WIDTH>;
400
401    fn shl(self, rhs: &'b i32) -> Self::Output {
402        *self << *rhs
403    }
404}
405
406impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<i32> for Aint<R, WIDTH> {
407    fn shl_assign(&mut self, rhs: i32) {
408        *self = *self << rhs;
409    }
410}
411
412impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&i32> for Aint<R, WIDTH> {
413    fn shl_assign(&mut self, rhs: &i32) {
414        *self = *self << *rhs;
415    }
416}
417
418impl<R: Sealed, const WIDTH: u32> core::ops::Shl<i64> for Aint<R, WIDTH> {
419    type Output = Self;
420
421    fn shl(self, rhs: i64) -> Self {
422        debug_assert!(
423            rhs < WIDTH as i64 && rhs > -(WIDTH as i64),
424            "attempt to shift left with overflow"
425        );
426        Self::_new_wrapping(self.0 << rhs)
427    }
428}
429
430impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&i64> for Aint<R, WIDTH> {
431    type Output = Self;
432
433    fn shl(self, rhs: &i64) -> Self {
434        self << *rhs
435    }
436}
437
438impl<R: Sealed, const WIDTH: u32> core::ops::Shl<i64> for &Aint<R, WIDTH> {
439    type Output = Aint<R, WIDTH>;
440
441    fn shl(self, rhs: i64) -> Self::Output {
442        *self << rhs
443    }
444}
445
446impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b i64> for &'a Aint<R, WIDTH> {
447    type Output = Aint<R, WIDTH>;
448
449    fn shl(self, rhs: &'b i64) -> Self::Output {
450        *self << *rhs
451    }
452}
453
454impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<i64> for Aint<R, WIDTH> {
455    fn shl_assign(&mut self, rhs: i64) {
456        *self = *self << rhs;
457    }
458}
459
460impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&i64> for Aint<R, WIDTH> {
461    fn shl_assign(&mut self, rhs: &i64) {
462        *self = *self << *rhs;
463    }
464}
465
466impl<R: Sealed, const WIDTH: u32> core::ops::Shl<i128> for Aint<R, WIDTH> {
467    type Output = Self;
468
469    fn shl(self, rhs: i128) -> Self {
470        debug_assert!(
471            rhs < WIDTH as i128 && rhs > -(WIDTH as i128),
472            "attempt to shift left with overflow"
473        );
474        Self::_new_wrapping(self.0 << rhs)
475    }
476}
477
478impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&i128> for Aint<R, WIDTH> {
479    type Output = Self;
480
481    fn shl(self, rhs: &i128) -> Self {
482        self << *rhs
483    }
484}
485
486impl<R: Sealed, const WIDTH: u32> core::ops::Shl<i128> for &Aint<R, WIDTH> {
487    type Output = Aint<R, WIDTH>;
488
489    fn shl(self, rhs: i128) -> Self::Output {
490        *self << rhs
491    }
492}
493
494impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b i128> for &'a Aint<R, WIDTH> {
495    type Output = Aint<R, WIDTH>;
496
497    fn shl(self, rhs: &'b i128) -> Self::Output {
498        *self << *rhs
499    }
500}
501
502impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<i128> for Aint<R, WIDTH> {
503    fn shl_assign(&mut self, rhs: i128) {
504        *self = *self << rhs;
505    }
506}
507
508impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&i128> for Aint<R, WIDTH> {
509    fn shl_assign(&mut self, rhs: &i128) {
510        *self = *self << *rhs;
511    }
512}
513
514impl<R: Sealed, const WIDTH: u32> core::ops::Shl<isize> for Aint<R, WIDTH> {
515    type Output = Self;
516
517    fn shl(self, rhs: isize) -> Self {
518        debug_assert!(
519            rhs < WIDTH as isize && rhs > -(WIDTH as isize),
520            "attempt to shift left with overflow"
521        );
522        Self::_new_wrapping(self.0 << rhs)
523    }
524}
525
526impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&isize> for Aint<R, WIDTH> {
527    type Output = Self;
528
529    fn shl(self, rhs: &isize) -> Self {
530        self << *rhs
531    }
532}
533
534impl<R: Sealed, const WIDTH: u32> core::ops::Shl<isize> for &Aint<R, WIDTH> {
535    type Output = Aint<R, WIDTH>;
536
537    fn shl(self, rhs: isize) -> Self::Output {
538        *self << rhs
539    }
540}
541
542impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b isize> for &'a Aint<R, WIDTH> {
543    type Output = Aint<R, WIDTH>;
544
545    fn shl(self, rhs: &'b isize) -> Self::Output {
546        *self << *rhs
547    }
548}
549
550impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<isize> for Aint<R, WIDTH> {
551    fn shl_assign(&mut self, rhs: isize) {
552        *self = *self << rhs;
553    }
554}
555
556impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&isize> for Aint<R, WIDTH> {
557    fn shl_assign(&mut self, rhs: &isize) {
558        *self = *self << *rhs;
559    }
560}
561
562impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> core::ops::Shl<Aint<R2, WIDTH2>>
563    for Aint<R1, WIDTH1>
564{
565    type Output = Self;
566
567    fn shl(self, rhs: Aint<R2, WIDTH2>) -> Self {
568        let rhs: i32 = match rhs.0.try_into() {
569            Ok(rhs) => rhs,
570            Err(_) => i32::MAX,
571        };
572        self << rhs
573    }
574}
575
576impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> core::ops::Shl<Aint<R2, WIDTH2>>
577    for &Aint<R1, WIDTH1>
578{
579    type Output = Aint<R1, WIDTH1>;
580
581    fn shl(self, rhs: Aint<R2, WIDTH2>) -> Self::Output {
582        *self << rhs
583    }
584}
585
586impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> core::ops::Shl<&Aint<R2, WIDTH2>>
587    for Aint<R1, WIDTH1>
588{
589    type Output = Self;
590
591    fn shl(self, rhs: &Aint<R2, WIDTH2>) -> Self {
592        self << *rhs
593    }
594}
595
596impl<'a, 'b, R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32>
597    core::ops::Shl<&'b Aint<R2, WIDTH2>> for &'a Aint<R1, WIDTH1>
598{
599    type Output = Aint<R1, WIDTH1>;
600
601    fn shl(self, rhs: &'b Aint<R2, WIDTH2>) -> Self::Output {
602        *self << *rhs
603    }
604}
605
606impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32>
607    core::ops::ShlAssign<Aint<R2, WIDTH2>> for Aint<R1, WIDTH1>
608{
609    fn shl_assign(&mut self, rhs: Aint<R2, WIDTH2>) {
610        *self = *self << rhs;
611    }
612}
613
614impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32>
615    core::ops::ShlAssign<&Aint<R2, WIDTH2>> for Aint<R1, WIDTH1>
616{
617    fn shl_assign(&mut self, rhs: &Aint<R2, WIDTH2>) {
618        *self = *self << *rhs;
619    }
620}
621
622impl<R: Sealed, const WIDTH: u32> core::ops::Shr<u8> for Aint<R, WIDTH> {
623    type Output = Self;
624
625    fn shr(self, rhs: u8) -> Self {
626        debug_assert!((rhs as u32) < WIDTH, "attempt to shift right with overflow");
627        Self::_new_wrapping(self.0 >> rhs)
628    }
629}
630
631impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&u8> for Aint<R, WIDTH> {
632    type Output = Self;
633
634    fn shr(self, rhs: &u8) -> Self {
635        self >> *rhs
636    }
637}
638
639impl<R: Sealed, const WIDTH: u32> core::ops::Shr<u8> for &Aint<R, WIDTH> {
640    type Output = Aint<R, WIDTH>;
641
642    fn shr(self, rhs: u8) -> Self::Output {
643        *self >> rhs
644    }
645}
646
647impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b u8> for &'a Aint<R, WIDTH> {
648    type Output = Aint<R, WIDTH>;
649
650    fn shr(self, rhs: &'b u8) -> Self::Output {
651        *self >> *rhs
652    }
653}
654
655impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<u8> for Aint<R, WIDTH> {
656    fn shr_assign(&mut self, rhs: u8) {
657        *self = *self >> rhs;
658    }
659}
660
661impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&u8> for Aint<R, WIDTH> {
662    fn shr_assign(&mut self, rhs: &u8) {
663        *self = *self >> *rhs;
664    }
665}
666
667impl<R: Sealed, const WIDTH: u32> core::ops::Shr<u16> for Aint<R, WIDTH> {
668    type Output = Self;
669
670    fn shr(self, rhs: u16) -> Self {
671        debug_assert!((rhs as u32) < WIDTH, "attempt to shift right with overflow");
672        Self::_new_wrapping(self.0 >> rhs)
673    }
674}
675
676impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&u16> for Aint<R, WIDTH> {
677    type Output = Self;
678
679    fn shr(self, rhs: &u16) -> Self {
680        self >> *rhs
681    }
682}
683
684impl<R: Sealed, const WIDTH: u32> core::ops::Shr<u16> for &Aint<R, WIDTH> {
685    type Output = Aint<R, WIDTH>;
686
687    fn shr(self, rhs: u16) -> Self::Output {
688        *self >> rhs
689    }
690}
691
692impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b u16> for &'a Aint<R, WIDTH> {
693    type Output = Aint<R, WIDTH>;
694
695    fn shr(self, rhs: &'b u16) -> Self::Output {
696        *self >> *rhs
697    }
698}
699
700impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<u16> for Aint<R, WIDTH> {
701    fn shr_assign(&mut self, rhs: u16) {
702        *self = *self >> rhs;
703    }
704}
705
706impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&u16> for Aint<R, WIDTH> {
707    fn shr_assign(&mut self, rhs: &u16) {
708        *self = *self >> *rhs;
709    }
710}
711
712impl<R: Sealed, const WIDTH: u32> core::ops::Shr<u32> for Aint<R, WIDTH> {
713    type Output = Self;
714
715    fn shr(self, rhs: u32) -> Self {
716        debug_assert!(rhs < WIDTH, "attempt to shift right with overflow");
717        Self::_new_wrapping(self.0 >> rhs)
718    }
719}
720
721impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&u32> for Aint<R, WIDTH> {
722    type Output = Self;
723
724    fn shr(self, rhs: &u32) -> Self {
725        self >> *rhs
726    }
727}
728
729impl<R: Sealed, const WIDTH: u32> core::ops::Shr<u32> for &Aint<R, WIDTH> {
730    type Output = Aint<R, WIDTH>;
731
732    fn shr(self, rhs: u32) -> Self::Output {
733        *self >> rhs
734    }
735}
736
737impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b u32> for &'a Aint<R, WIDTH> {
738    type Output = Aint<R, WIDTH>;
739
740    fn shr(self, rhs: &'b u32) -> Self::Output {
741        *self >> *rhs
742    }
743}
744
745impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<u32> for Aint<R, WIDTH> {
746    fn shr_assign(&mut self, rhs: u32) {
747        *self = *self >> rhs;
748    }
749}
750
751impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&u32> for Aint<R, WIDTH> {
752    fn shr_assign(&mut self, rhs: &u32) {
753        *self = *self >> *rhs;
754    }
755}
756
757impl<R: Sealed, const WIDTH: u32> core::ops::Shr<u64> for Aint<R, WIDTH> {
758    type Output = Self;
759
760    fn shr(self, rhs: u64) -> Self {
761        debug_assert!(rhs < WIDTH as u64, "attempt to shift right with overflow");
762        Self::_new_wrapping(self.0 >> rhs)
763    }
764}
765
766impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&u64> for Aint<R, WIDTH> {
767    type Output = Self;
768
769    fn shr(self, rhs: &u64) -> Self {
770        self >> *rhs
771    }
772}
773
774impl<R: Sealed, const WIDTH: u32> core::ops::Shr<u64> for &Aint<R, WIDTH> {
775    type Output = Aint<R, WIDTH>;
776
777    fn shr(self, rhs: u64) -> Self::Output {
778        *self >> rhs
779    }
780}
781
782impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b u64> for &'a Aint<R, WIDTH> {
783    type Output = Aint<R, WIDTH>;
784
785    fn shr(self, rhs: &'b u64) -> Self::Output {
786        *self >> *rhs
787    }
788}
789
790impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<u64> for Aint<R, WIDTH> {
791    fn shr_assign(&mut self, rhs: u64) {
792        *self = *self >> rhs;
793    }
794}
795
796impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&u64> for Aint<R, WIDTH> {
797    fn shr_assign(&mut self, rhs: &u64) {
798        *self = *self >> *rhs;
799    }
800}
801
802impl<R: Sealed, const WIDTH: u32> core::ops::Shr<u128> for Aint<R, WIDTH> {
803    type Output = Self;
804
805    fn shr(self, rhs: u128) -> Self {
806        debug_assert!(rhs < WIDTH as u128, "attempt to shift right with overflow");
807        Self::_new_wrapping(self.0 >> rhs)
808    }
809}
810
811impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&u128> for Aint<R, WIDTH> {
812    type Output = Self;
813
814    fn shr(self, rhs: &u128) -> Self {
815        self >> *rhs
816    }
817}
818
819impl<R: Sealed, const WIDTH: u32> core::ops::Shr<u128> for &Aint<R, WIDTH> {
820    type Output = Aint<R, WIDTH>;
821
822    fn shr(self, rhs: u128) -> Self::Output {
823        *self >> rhs
824    }
825}
826
827impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b u128> for &'a Aint<R, WIDTH> {
828    type Output = Aint<R, WIDTH>;
829
830    fn shr(self, rhs: &'b u128) -> Self::Output {
831        *self >> *rhs
832    }
833}
834
835impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<u128> for Aint<R, WIDTH> {
836    fn shr_assign(&mut self, rhs: u128) {
837        *self = *self >> rhs;
838    }
839}
840
841impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&u128> for Aint<R, WIDTH> {
842    fn shr_assign(&mut self, rhs: &u128) {
843        *self = *self >> *rhs;
844    }
845}
846
847impl<R: Sealed, const WIDTH: u32> core::ops::Shr<usize> for Aint<R, WIDTH> {
848    type Output = Self;
849
850    fn shr(self, rhs: usize) -> Self {
851        debug_assert!(rhs < WIDTH as usize, "attempt to shift right with overflow");
852        Self::_new_wrapping(self.0 >> rhs)
853    }
854}
855
856impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&usize> for Aint<R, WIDTH> {
857    type Output = Self;
858
859    fn shr(self, rhs: &usize) -> Self {
860        self >> *rhs
861    }
862}
863
864impl<R: Sealed, const WIDTH: u32> core::ops::Shr<usize> for &Aint<R, WIDTH> {
865    type Output = Aint<R, WIDTH>;
866
867    fn shr(self, rhs: usize) -> Self::Output {
868        *self >> rhs
869    }
870}
871
872impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b usize> for &'a Aint<R, WIDTH> {
873    type Output = Aint<R, WIDTH>;
874
875    fn shr(self, rhs: &'b usize) -> Self::Output {
876        *self >> *rhs
877    }
878}
879
880impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<usize> for Aint<R, WIDTH> {
881    fn shr_assign(&mut self, rhs: usize) {
882        *self = *self >> rhs;
883    }
884}
885
886impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&usize> for Aint<R, WIDTH> {
887    fn shr_assign(&mut self, rhs: &usize) {
888        *self = *self >> *rhs;
889    }
890}
891
892impl<R: Sealed, const WIDTH: u32> core::ops::Shr<i8> for Aint<R, WIDTH> {
893    type Output = Self;
894
895    fn shr(self, rhs: i8) -> Self {
896        debug_assert!(
897            (rhs as i64) < (WIDTH as i64) && (rhs as i64) > -(WIDTH as i64),
898            "attempt to shift right with overflow"
899        );
900        Self::_new_wrapping(self.0 >> rhs)
901    }
902}
903
904impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&i8> for Aint<R, WIDTH> {
905    type Output = Self;
906
907    fn shr(self, rhs: &i8) -> Self {
908        self >> *rhs
909    }
910}
911
912impl<R: Sealed, const WIDTH: u32> core::ops::Shr<i8> for &Aint<R, WIDTH> {
913    type Output = Aint<R, WIDTH>;
914
915    fn shr(self, rhs: i8) -> Self::Output {
916        *self >> rhs
917    }
918}
919
920impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b i8> for &'a Aint<R, WIDTH> {
921    type Output = Aint<R, WIDTH>;
922
923    fn shr(self, rhs: &'b i8) -> Self::Output {
924        *self >> *rhs
925    }
926}
927
928impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<i8> for Aint<R, WIDTH> {
929    fn shr_assign(&mut self, rhs: i8) {
930        *self = *self >> rhs;
931    }
932}
933
934impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&i8> for Aint<R, WIDTH> {
935    fn shr_assign(&mut self, rhs: &i8) {
936        *self = *self >> *rhs;
937    }
938}
939
940impl<R: Sealed, const WIDTH: u32> core::ops::Shr<i16> for Aint<R, WIDTH> {
941    type Output = Self;
942
943    fn shr(self, rhs: i16) -> Self {
944        debug_assert!(
945            (rhs as i64) < (WIDTH as i64) && (rhs as i64) > -(WIDTH as i64),
946            "attempt to shift right with overflow"
947        );
948        Self::_new_wrapping(self.0 >> rhs)
949    }
950}
951
952impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&i16> for Aint<R, WIDTH> {
953    type Output = Self;
954
955    fn shr(self, rhs: &i16) -> Self {
956        self >> *rhs
957    }
958}
959
960impl<R: Sealed, const WIDTH: u32> core::ops::Shr<i16> for &Aint<R, WIDTH> {
961    type Output = Aint<R, WIDTH>;
962
963    fn shr(self, rhs: i16) -> Self::Output {
964        *self >> rhs
965    }
966}
967
968impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b i16> for &'a Aint<R, WIDTH> {
969    type Output = Aint<R, WIDTH>;
970
971    fn shr(self, rhs: &'b i16) -> Self::Output {
972        *self >> *rhs
973    }
974}
975
976impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<i16> for Aint<R, WIDTH> {
977    fn shr_assign(&mut self, rhs: i16) {
978        *self = *self >> rhs;
979    }
980}
981
982impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&i16> for Aint<R, WIDTH> {
983    fn shr_assign(&mut self, rhs: &i16) {
984        *self = *self >> *rhs;
985    }
986}
987
988impl<R: Sealed, const WIDTH: u32> core::ops::Shr<i32> for Aint<R, WIDTH> {
989    type Output = Self;
990
991    fn shr(self, rhs: i32) -> Self {
992        debug_assert!(
993            (rhs as i64) < (WIDTH as i64) && (rhs as i64) > -(WIDTH as i64),
994            "attempt to shift right with overflow"
995        );
996        Self::_new_wrapping(self.0 >> rhs)
997    }
998}
999
1000impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&i32> for Aint<R, WIDTH> {
1001    type Output = Self;
1002
1003    fn shr(self, rhs: &i32) -> Self {
1004        self >> *rhs
1005    }
1006}
1007
1008impl<R: Sealed, const WIDTH: u32> core::ops::Shr<i32> for &Aint<R, WIDTH> {
1009    type Output = Aint<R, WIDTH>;
1010
1011    fn shr(self, rhs: i32) -> Self::Output {
1012        *self >> rhs
1013    }
1014}
1015
1016impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b i32> for &'a Aint<R, WIDTH> {
1017    type Output = Aint<R, WIDTH>;
1018
1019    fn shr(self, rhs: &'b i32) -> Self::Output {
1020        *self >> *rhs
1021    }
1022}
1023
1024impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<i32> for Aint<R, WIDTH> {
1025    fn shr_assign(&mut self, rhs: i32) {
1026        *self = *self >> rhs;
1027    }
1028}
1029
1030impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&i32> for Aint<R, WIDTH> {
1031    fn shr_assign(&mut self, rhs: &i32) {
1032        *self = *self >> *rhs;
1033    }
1034}
1035
1036impl<R: Sealed, const WIDTH: u32> core::ops::Shr<i64> for Aint<R, WIDTH> {
1037    type Output = Self;
1038
1039    fn shr(self, rhs: i64) -> Self {
1040        debug_assert!(
1041            rhs < WIDTH as i64 && rhs > -(WIDTH as i64),
1042            "attempt to shift right with overflow"
1043        );
1044        Self::_new_wrapping(self.0 >> rhs)
1045    }
1046}
1047
1048impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&i64> for Aint<R, WIDTH> {
1049    type Output = Self;
1050
1051    fn shr(self, rhs: &i64) -> Self {
1052        self >> *rhs
1053    }
1054}
1055
1056impl<R: Sealed, const WIDTH: u32> core::ops::Shr<i64> for &Aint<R, WIDTH> {
1057    type Output = Aint<R, WIDTH>;
1058
1059    fn shr(self, rhs: i64) -> Self::Output {
1060        *self >> rhs
1061    }
1062}
1063
1064impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b i64> for &'a Aint<R, WIDTH> {
1065    type Output = Aint<R, WIDTH>;
1066
1067    fn shr(self, rhs: &'b i64) -> Self::Output {
1068        *self >> *rhs
1069    }
1070}
1071
1072impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<i64> for Aint<R, WIDTH> {
1073    fn shr_assign(&mut self, rhs: i64) {
1074        *self = *self >> rhs;
1075    }
1076}
1077
1078impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&i64> for Aint<R, WIDTH> {
1079    fn shr_assign(&mut self, rhs: &i64) {
1080        *self = *self >> *rhs;
1081    }
1082}
1083
1084impl<R: Sealed, const WIDTH: u32> core::ops::Shr<i128> for Aint<R, WIDTH> {
1085    type Output = Self;
1086
1087    fn shr(self, rhs: i128) -> Self {
1088        debug_assert!(
1089            rhs < WIDTH as i128 && rhs > -(WIDTH as i128),
1090            "attempt to shift right with overflow"
1091        );
1092        Self::_new_wrapping(self.0 >> rhs)
1093    }
1094}
1095
1096impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&i128> for Aint<R, WIDTH> {
1097    type Output = Self;
1098
1099    fn shr(self, rhs: &i128) -> Self {
1100        self >> *rhs
1101    }
1102}
1103
1104impl<R: Sealed, const WIDTH: u32> core::ops::Shr<i128> for &Aint<R, WIDTH> {
1105    type Output = Aint<R, WIDTH>;
1106
1107    fn shr(self, rhs: i128) -> Self::Output {
1108        *self >> rhs
1109    }
1110}
1111
1112impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b i128> for &'a Aint<R, WIDTH> {
1113    type Output = Aint<R, WIDTH>;
1114
1115    fn shr(self, rhs: &'b i128) -> Self::Output {
1116        *self >> *rhs
1117    }
1118}
1119
1120impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<i128> for Aint<R, WIDTH> {
1121    fn shr_assign(&mut self, rhs: i128) {
1122        *self = *self >> rhs;
1123    }
1124}
1125
1126impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&i128> for Aint<R, WIDTH> {
1127    fn shr_assign(&mut self, rhs: &i128) {
1128        *self = *self >> *rhs;
1129    }
1130}
1131
1132impl<R: Sealed, const WIDTH: u32> core::ops::Shr<isize> for Aint<R, WIDTH> {
1133    type Output = Self;
1134
1135    fn shr(self, rhs: isize) -> Self {
1136        debug_assert!(
1137            rhs < WIDTH as isize && rhs > -(WIDTH as isize),
1138            "attempt to shift right with overflow"
1139        );
1140        Self::_new_wrapping(self.0 >> rhs)
1141    }
1142}
1143
1144impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&isize> for Aint<R, WIDTH> {
1145    type Output = Self;
1146
1147    fn shr(self, rhs: &isize) -> Self {
1148        self >> *rhs
1149    }
1150}
1151
1152impl<R: Sealed, const WIDTH: u32> core::ops::Shr<isize> for &Aint<R, WIDTH> {
1153    type Output = Aint<R, WIDTH>;
1154
1155    fn shr(self, rhs: isize) -> Self::Output {
1156        *self >> rhs
1157    }
1158}
1159
1160impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b isize> for &'a Aint<R, WIDTH> {
1161    type Output = Aint<R, WIDTH>;
1162
1163    fn shr(self, rhs: &'b isize) -> Self::Output {
1164        *self >> *rhs
1165    }
1166}
1167
1168impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<isize> for Aint<R, WIDTH> {
1169    fn shr_assign(&mut self, rhs: isize) {
1170        *self = *self >> rhs;
1171    }
1172}
1173
1174impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&isize> for Aint<R, WIDTH> {
1175    fn shr_assign(&mut self, rhs: &isize) {
1176        *self = *self >> *rhs;
1177    }
1178}
1179
1180impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> core::ops::Shr<Aint<R2, WIDTH2>>
1181    for Aint<R1, WIDTH1>
1182{
1183    type Output = Self;
1184
1185    fn shr(self, rhs: Aint<R2, WIDTH2>) -> Self {
1186        let rhs: i32 = match rhs.0.try_into() {
1187            Ok(rhs) => rhs,
1188            Err(_) => i32::MAX,
1189        };
1190        self >> rhs
1191    }
1192}
1193
1194impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> core::ops::Shr<Aint<R2, WIDTH2>>
1195    for &Aint<R1, WIDTH1>
1196{
1197    type Output = Aint<R1, WIDTH1>;
1198
1199    fn shr(self, rhs: Aint<R2, WIDTH2>) -> Self::Output {
1200        *self >> rhs
1201    }
1202}
1203
1204impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32> core::ops::Shr<&Aint<R2, WIDTH2>>
1205    for Aint<R1, WIDTH1>
1206{
1207    type Output = Self;
1208
1209    fn shr(self, rhs: &Aint<R2, WIDTH2>) -> Self {
1210        self >> *rhs
1211    }
1212}
1213
1214impl<'a, 'b, R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32>
1215    core::ops::Shr<&'b Aint<R2, WIDTH2>> for &'a Aint<R1, WIDTH1>
1216{
1217    type Output = Aint<R1, WIDTH1>;
1218
1219    fn shr(self, rhs: &'b Aint<R2, WIDTH2>) -> Self::Output {
1220        *self >> *rhs
1221    }
1222}
1223
1224impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32>
1225    core::ops::ShrAssign<Aint<R2, WIDTH2>> for Aint<R1, WIDTH1>
1226{
1227    fn shr_assign(&mut self, rhs: Aint<R2, WIDTH2>) {
1228        *self = *self >> rhs;
1229    }
1230}
1231
1232impl<R1: Sealed, R2: Sealed, const WIDTH1: u32, const WIDTH2: u32>
1233    core::ops::ShrAssign<&Aint<R2, WIDTH2>> for Aint<R1, WIDTH1>
1234{
1235    fn shr_assign(&mut self, rhs: &Aint<R2, WIDTH2>) {
1236        *self = *self >> *rhs;
1237    }
1238}
1239
1240impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for u8
1241where
1242    u8: core::ops::Shl<R, Output = u8>,
1243{
1244    type Output = Self;
1245
1246    fn shl(self, rhs: Aint<R, WIDTH>) -> Self {
1247        self << rhs.0
1248    }
1249}
1250
1251impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for &u8
1252where
1253    u8: core::ops::Shl<R, Output = u8>,
1254{
1255    type Output = u8;
1256
1257    fn shl(self, rhs: Aint<R, WIDTH>) -> u8 {
1258        *self << rhs.0
1259    }
1260}
1261
1262impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&Aint<R, WIDTH>> for u8
1263where
1264    u8: core::ops::Shl<R, Output = u8>,
1265{
1266    type Output = Self;
1267
1268    fn shl(self, rhs: &Aint<R, WIDTH>) -> Self {
1269        self << rhs.0
1270    }
1271}
1272
1273impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b Aint<R, WIDTH>> for &'a u8
1274where
1275    u8: core::ops::Shl<R, Output = u8>,
1276{
1277    type Output = u8;
1278
1279    fn shl(self, rhs: &'b Aint<R, WIDTH>) -> u8 {
1280        *self << rhs.0
1281    }
1282}
1283
1284impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<Aint<R, WIDTH>> for u8
1285where
1286    u8: core::ops::ShlAssign<R>,
1287{
1288    fn shl_assign(&mut self, rhs: Aint<R, WIDTH>) {
1289        self.shl_assign(rhs.0)
1290    }
1291}
1292
1293impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&Aint<R, WIDTH>> for u8
1294where
1295    u8: core::ops::ShlAssign<R>,
1296{
1297    fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>) {
1298        self.shl_assign(rhs.0)
1299    }
1300}
1301
1302impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for u16
1303where
1304    u16: core::ops::Shl<R, Output = u16>,
1305{
1306    type Output = Self;
1307
1308    fn shl(self, rhs: Aint<R, WIDTH>) -> Self {
1309        self << rhs.0
1310    }
1311}
1312
1313impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for &u16
1314where
1315    u16: core::ops::Shl<R, Output = u16>,
1316{
1317    type Output = u16;
1318
1319    fn shl(self, rhs: Aint<R, WIDTH>) -> u16 {
1320        *self << rhs.0
1321    }
1322}
1323
1324impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&Aint<R, WIDTH>> for u16
1325where
1326    u16: core::ops::Shl<R, Output = u16>,
1327{
1328    type Output = Self;
1329
1330    fn shl(self, rhs: &Aint<R, WIDTH>) -> Self {
1331        self << rhs.0
1332    }
1333}
1334
1335impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b Aint<R, WIDTH>> for &'a u16
1336where
1337    u16: core::ops::Shl<R, Output = u16>,
1338{
1339    type Output = u16;
1340
1341    fn shl(self, rhs: &'b Aint<R, WIDTH>) -> u16 {
1342        *self << rhs.0
1343    }
1344}
1345
1346impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<Aint<R, WIDTH>> for u16
1347where
1348    u16: core::ops::ShlAssign<R>,
1349{
1350    fn shl_assign(&mut self, rhs: Aint<R, WIDTH>) {
1351        self.shl_assign(rhs.0)
1352    }
1353}
1354
1355impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&Aint<R, WIDTH>> for u16
1356where
1357    u16: core::ops::ShlAssign<R>,
1358{
1359    fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>) {
1360        self.shl_assign(rhs.0)
1361    }
1362}
1363
1364impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for u32
1365where
1366    u32: core::ops::Shl<R, Output = u32>,
1367{
1368    type Output = Self;
1369
1370    fn shl(self, rhs: Aint<R, WIDTH>) -> Self {
1371        self << rhs.0
1372    }
1373}
1374
1375impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for &u32
1376where
1377    u32: core::ops::Shl<R, Output = u32>,
1378{
1379    type Output = u32;
1380
1381    fn shl(self, rhs: Aint<R, WIDTH>) -> u32 {
1382        *self << rhs.0
1383    }
1384}
1385
1386impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&Aint<R, WIDTH>> for u32
1387where
1388    u32: core::ops::Shl<R, Output = u32>,
1389{
1390    type Output = Self;
1391
1392    fn shl(self, rhs: &Aint<R, WIDTH>) -> Self {
1393        self << rhs.0
1394    }
1395}
1396
1397impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b Aint<R, WIDTH>> for &'a u32
1398where
1399    u32: core::ops::Shl<R, Output = u32>,
1400{
1401    type Output = u32;
1402
1403    fn shl(self, rhs: &'b Aint<R, WIDTH>) -> u32 {
1404        *self << rhs.0
1405    }
1406}
1407
1408impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<Aint<R, WIDTH>> for u32
1409where
1410    u32: core::ops::ShlAssign<R>,
1411{
1412    fn shl_assign(&mut self, rhs: Aint<R, WIDTH>) {
1413        self.shl_assign(rhs.0)
1414    }
1415}
1416
1417impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&Aint<R, WIDTH>> for u32
1418where
1419    u32: core::ops::ShlAssign<R>,
1420{
1421    fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>) {
1422        self.shl_assign(rhs.0)
1423    }
1424}
1425
1426impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for u64
1427where
1428    u64: core::ops::Shl<R, Output = u64>,
1429{
1430    type Output = Self;
1431
1432    fn shl(self, rhs: Aint<R, WIDTH>) -> Self {
1433        self << rhs.0
1434    }
1435}
1436
1437impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for &u64
1438where
1439    u64: core::ops::Shl<R, Output = u64>,
1440{
1441    type Output = u64;
1442
1443    fn shl(self, rhs: Aint<R, WIDTH>) -> u64 {
1444        *self << rhs.0
1445    }
1446}
1447
1448impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&Aint<R, WIDTH>> for u64
1449where
1450    u64: core::ops::Shl<R, Output = u64>,
1451{
1452    type Output = Self;
1453
1454    fn shl(self, rhs: &Aint<R, WIDTH>) -> Self {
1455        self << rhs.0
1456    }
1457}
1458
1459impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b Aint<R, WIDTH>> for &'a u64
1460where
1461    u64: core::ops::Shl<R, Output = u64>,
1462{
1463    type Output = u64;
1464
1465    fn shl(self, rhs: &'b Aint<R, WIDTH>) -> u64 {
1466        *self << rhs.0
1467    }
1468}
1469
1470impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<Aint<R, WIDTH>> for u64
1471where
1472    u64: core::ops::ShlAssign<R>,
1473{
1474    fn shl_assign(&mut self, rhs: Aint<R, WIDTH>) {
1475        self.shl_assign(rhs.0)
1476    }
1477}
1478
1479impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&Aint<R, WIDTH>> for u64
1480where
1481    u64: core::ops::ShlAssign<R>,
1482{
1483    fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>) {
1484        self.shl_assign(rhs.0)
1485    }
1486}
1487
1488impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for u128
1489where
1490    u128: core::ops::Shl<R, Output = u128>,
1491{
1492    type Output = Self;
1493
1494    fn shl(self, rhs: Aint<R, WIDTH>) -> Self {
1495        self << rhs.0
1496    }
1497}
1498
1499impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for &u128
1500where
1501    u128: core::ops::Shl<R, Output = u128>,
1502{
1503    type Output = u128;
1504
1505    fn shl(self, rhs: Aint<R, WIDTH>) -> u128 {
1506        *self << rhs.0
1507    }
1508}
1509
1510impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&Aint<R, WIDTH>> for u128
1511where
1512    u128: core::ops::Shl<R, Output = u128>,
1513{
1514    type Output = Self;
1515
1516    fn shl(self, rhs: &Aint<R, WIDTH>) -> Self {
1517        self << rhs.0
1518    }
1519}
1520
1521impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b Aint<R, WIDTH>> for &'a u128
1522where
1523    u128: core::ops::Shl<R, Output = u128>,
1524{
1525    type Output = u128;
1526
1527    fn shl(self, rhs: &'b Aint<R, WIDTH>) -> u128 {
1528        *self << rhs.0
1529    }
1530}
1531
1532impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<Aint<R, WIDTH>> for u128
1533where
1534    u128: core::ops::ShlAssign<R>,
1535{
1536    fn shl_assign(&mut self, rhs: Aint<R, WIDTH>) {
1537        self.shl_assign(rhs.0)
1538    }
1539}
1540
1541impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&Aint<R, WIDTH>> for u128
1542where
1543    u128: core::ops::ShlAssign<R>,
1544{
1545    fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>) {
1546        self.shl_assign(rhs.0)
1547    }
1548}
1549
1550impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for usize
1551where
1552    usize: core::ops::Shl<R, Output = usize>,
1553{
1554    type Output = Self;
1555
1556    fn shl(self, rhs: Aint<R, WIDTH>) -> Self {
1557        self << rhs.0
1558    }
1559}
1560
1561impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for &usize
1562where
1563    usize: core::ops::Shl<R, Output = usize>,
1564{
1565    type Output = usize;
1566
1567    fn shl(self, rhs: Aint<R, WIDTH>) -> usize {
1568        *self << rhs.0
1569    }
1570}
1571
1572impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&Aint<R, WIDTH>> for usize
1573where
1574    usize: core::ops::Shl<R, Output = usize>,
1575{
1576    type Output = Self;
1577
1578    fn shl(self, rhs: &Aint<R, WIDTH>) -> Self {
1579        self << rhs.0
1580    }
1581}
1582
1583impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b Aint<R, WIDTH>> for &'a usize
1584where
1585    usize: core::ops::Shl<R, Output = usize>,
1586{
1587    type Output = usize;
1588
1589    fn shl(self, rhs: &'b Aint<R, WIDTH>) -> usize {
1590        *self << rhs.0
1591    }
1592}
1593
1594impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<Aint<R, WIDTH>> for usize
1595where
1596    usize: core::ops::ShlAssign<R>,
1597{
1598    fn shl_assign(&mut self, rhs: Aint<R, WIDTH>) {
1599        self.shl_assign(rhs.0)
1600    }
1601}
1602
1603impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&Aint<R, WIDTH>> for usize
1604where
1605    usize: core::ops::ShlAssign<R>,
1606{
1607    fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>) {
1608        self.shl_assign(rhs.0)
1609    }
1610}
1611
1612impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for i8
1613where
1614    i8: core::ops::Shl<R, Output = i8>,
1615{
1616    type Output = Self;
1617
1618    fn shl(self, rhs: Aint<R, WIDTH>) -> Self {
1619        self << rhs.0
1620    }
1621}
1622
1623impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for &i8
1624where
1625    i8: core::ops::Shl<R, Output = i8>,
1626{
1627    type Output = i8;
1628
1629    fn shl(self, rhs: Aint<R, WIDTH>) -> i8 {
1630        *self << rhs.0
1631    }
1632}
1633
1634impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&Aint<R, WIDTH>> for i8
1635where
1636    i8: core::ops::Shl<R, Output = i8>,
1637{
1638    type Output = Self;
1639
1640    fn shl(self, rhs: &Aint<R, WIDTH>) -> Self {
1641        self << rhs.0
1642    }
1643}
1644
1645impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b Aint<R, WIDTH>> for &'a i8
1646where
1647    i8: core::ops::Shl<R, Output = i8>,
1648{
1649    type Output = i8;
1650
1651    fn shl(self, rhs: &'b Aint<R, WIDTH>) -> i8 {
1652        *self << rhs.0
1653    }
1654}
1655
1656impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<Aint<R, WIDTH>> for i8
1657where
1658    i8: core::ops::ShlAssign<R>,
1659{
1660    fn shl_assign(&mut self, rhs: Aint<R, WIDTH>) {
1661        self.shl_assign(rhs.0)
1662    }
1663}
1664
1665impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&Aint<R, WIDTH>> for i8
1666where
1667    i8: core::ops::ShlAssign<R>,
1668{
1669    fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>) {
1670        self.shl_assign(rhs.0)
1671    }
1672}
1673
1674impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for i16
1675where
1676    i16: core::ops::Shl<R, Output = i16>,
1677{
1678    type Output = Self;
1679
1680    fn shl(self, rhs: Aint<R, WIDTH>) -> Self {
1681        self << rhs.0
1682    }
1683}
1684
1685impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for &i16
1686where
1687    i16: core::ops::Shl<R, Output = i16>,
1688{
1689    type Output = i16;
1690
1691    fn shl(self, rhs: Aint<R, WIDTH>) -> i16 {
1692        *self << rhs.0
1693    }
1694}
1695
1696impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&Aint<R, WIDTH>> for i16
1697where
1698    i16: core::ops::Shl<R, Output = i16>,
1699{
1700    type Output = Self;
1701
1702    fn shl(self, rhs: &Aint<R, WIDTH>) -> Self {
1703        self << rhs.0
1704    }
1705}
1706
1707impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b Aint<R, WIDTH>> for &'a i16
1708where
1709    i16: core::ops::Shl<R, Output = i16>,
1710{
1711    type Output = i16;
1712
1713    fn shl(self, rhs: &'b Aint<R, WIDTH>) -> i16 {
1714        *self << rhs.0
1715    }
1716}
1717
1718impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<Aint<R, WIDTH>> for i16
1719where
1720    i16: core::ops::ShlAssign<R>,
1721{
1722    fn shl_assign(&mut self, rhs: Aint<R, WIDTH>) {
1723        self.shl_assign(rhs.0)
1724    }
1725}
1726
1727impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&Aint<R, WIDTH>> for i16
1728where
1729    i16: core::ops::ShlAssign<R>,
1730{
1731    fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>) {
1732        self.shl_assign(rhs.0)
1733    }
1734}
1735
1736impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for i32
1737where
1738    i32: core::ops::Shl<R, Output = i32>,
1739{
1740    type Output = Self;
1741
1742    fn shl(self, rhs: Aint<R, WIDTH>) -> Self {
1743        self << rhs.0
1744    }
1745}
1746
1747impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for &i32
1748where
1749    i32: core::ops::Shl<R, Output = i32>,
1750{
1751    type Output = i32;
1752
1753    fn shl(self, rhs: Aint<R, WIDTH>) -> i32 {
1754        *self << rhs.0
1755    }
1756}
1757
1758impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&Aint<R, WIDTH>> for i32
1759where
1760    i32: core::ops::Shl<R, Output = i32>,
1761{
1762    type Output = Self;
1763
1764    fn shl(self, rhs: &Aint<R, WIDTH>) -> Self {
1765        self << rhs.0
1766    }
1767}
1768
1769impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b Aint<R, WIDTH>> for &'a i32
1770where
1771    i32: core::ops::Shl<R, Output = i32>,
1772{
1773    type Output = i32;
1774
1775    fn shl(self, rhs: &'b Aint<R, WIDTH>) -> i32 {
1776        *self << rhs.0
1777    }
1778}
1779
1780impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<Aint<R, WIDTH>> for i32
1781where
1782    i32: core::ops::ShlAssign<R>,
1783{
1784    fn shl_assign(&mut self, rhs: Aint<R, WIDTH>) {
1785        self.shl_assign(rhs.0)
1786    }
1787}
1788
1789impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&Aint<R, WIDTH>> for i32
1790where
1791    i32: core::ops::ShlAssign<R>,
1792{
1793    fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>) {
1794        self.shl_assign(rhs.0)
1795    }
1796}
1797
1798impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for i64
1799where
1800    i64: core::ops::Shl<R, Output = i64>,
1801{
1802    type Output = Self;
1803
1804    fn shl(self, rhs: Aint<R, WIDTH>) -> Self {
1805        self << rhs.0
1806    }
1807}
1808
1809impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for &i64
1810where
1811    i64: core::ops::Shl<R, Output = i64>,
1812{
1813    type Output = i64;
1814
1815    fn shl(self, rhs: Aint<R, WIDTH>) -> i64 {
1816        *self << rhs.0
1817    }
1818}
1819
1820impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&Aint<R, WIDTH>> for i64
1821where
1822    i64: core::ops::Shl<R, Output = i64>,
1823{
1824    type Output = Self;
1825
1826    fn shl(self, rhs: &Aint<R, WIDTH>) -> Self {
1827        self << rhs.0
1828    }
1829}
1830
1831impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b Aint<R, WIDTH>> for &'a i64
1832where
1833    i64: core::ops::Shl<R, Output = i64>,
1834{
1835    type Output = i64;
1836
1837    fn shl(self, rhs: &'b Aint<R, WIDTH>) -> i64 {
1838        *self << rhs.0
1839    }
1840}
1841
1842impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<Aint<R, WIDTH>> for i64
1843where
1844    i64: core::ops::ShlAssign<R>,
1845{
1846    fn shl_assign(&mut self, rhs: Aint<R, WIDTH>) {
1847        self.shl_assign(rhs.0)
1848    }
1849}
1850
1851impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&Aint<R, WIDTH>> for i64
1852where
1853    i64: core::ops::ShlAssign<R>,
1854{
1855    fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>) {
1856        self.shl_assign(rhs.0)
1857    }
1858}
1859
1860impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for i128
1861where
1862    i128: core::ops::Shl<R, Output = i128>,
1863{
1864    type Output = Self;
1865
1866    fn shl(self, rhs: Aint<R, WIDTH>) -> Self {
1867        self << rhs.0
1868    }
1869}
1870
1871impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for &i128
1872where
1873    i128: core::ops::Shl<R, Output = i128>,
1874{
1875    type Output = i128;
1876
1877    fn shl(self, rhs: Aint<R, WIDTH>) -> i128 {
1878        *self << rhs.0
1879    }
1880}
1881
1882impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&Aint<R, WIDTH>> for i128
1883where
1884    i128: core::ops::Shl<R, Output = i128>,
1885{
1886    type Output = Self;
1887
1888    fn shl(self, rhs: &Aint<R, WIDTH>) -> Self {
1889        self << rhs.0
1890    }
1891}
1892
1893impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b Aint<R, WIDTH>> for &'a i128
1894where
1895    i128: core::ops::Shl<R, Output = i128>,
1896{
1897    type Output = i128;
1898
1899    fn shl(self, rhs: &'b Aint<R, WIDTH>) -> i128 {
1900        *self << rhs.0
1901    }
1902}
1903
1904impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<Aint<R, WIDTH>> for i128
1905where
1906    i128: core::ops::ShlAssign<R>,
1907{
1908    fn shl_assign(&mut self, rhs: Aint<R, WIDTH>) {
1909        self.shl_assign(rhs.0)
1910    }
1911}
1912
1913impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&Aint<R, WIDTH>> for i128
1914where
1915    i128: core::ops::ShlAssign<R>,
1916{
1917    fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>) {
1918        self.shl_assign(rhs.0)
1919    }
1920}
1921
1922impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for isize
1923where
1924    isize: core::ops::Shl<R, Output = isize>,
1925{
1926    type Output = Self;
1927
1928    fn shl(self, rhs: Aint<R, WIDTH>) -> Self {
1929        self << rhs.0
1930    }
1931}
1932
1933impl<R: Sealed, const WIDTH: u32> core::ops::Shl<Aint<R, WIDTH>> for &isize
1934where
1935    isize: core::ops::Shl<R, Output = isize>,
1936{
1937    type Output = isize;
1938
1939    fn shl(self, rhs: Aint<R, WIDTH>) -> isize {
1940        *self << rhs.0
1941    }
1942}
1943
1944impl<R: Sealed, const WIDTH: u32> core::ops::Shl<&Aint<R, WIDTH>> for isize
1945where
1946    isize: core::ops::Shl<R, Output = isize>,
1947{
1948    type Output = Self;
1949
1950    fn shl(self, rhs: &Aint<R, WIDTH>) -> Self {
1951        self << rhs.0
1952    }
1953}
1954
1955impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shl<&'b Aint<R, WIDTH>> for &'a isize
1956where
1957    isize: core::ops::Shl<R, Output = isize>,
1958{
1959    type Output = isize;
1960
1961    fn shl(self, rhs: &'b Aint<R, WIDTH>) -> isize {
1962        *self << rhs.0
1963    }
1964}
1965
1966impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<Aint<R, WIDTH>> for isize
1967where
1968    isize: core::ops::ShlAssign<R>,
1969{
1970    fn shl_assign(&mut self, rhs: Aint<R, WIDTH>) {
1971        self.shl_assign(rhs.0)
1972    }
1973}
1974
1975impl<R: Sealed, const WIDTH: u32> core::ops::ShlAssign<&Aint<R, WIDTH>> for isize
1976where
1977    isize: core::ops::ShlAssign<R>,
1978{
1979    fn shl_assign(&mut self, rhs: &Aint<R, WIDTH>) {
1980        self.shl_assign(rhs.0)
1981    }
1982}
1983
1984impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for u8
1985where
1986    u8: core::ops::Shr<R, Output = u8>,
1987{
1988    type Output = Self;
1989
1990    fn shr(self, rhs: Aint<R, WIDTH>) -> Self {
1991        self >> rhs.0
1992    }
1993}
1994
1995impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for &u8
1996where
1997    u8: core::ops::Shr<R, Output = u8>,
1998{
1999    type Output = u8;
2000
2001    fn shr(self, rhs: Aint<R, WIDTH>) -> u8 {
2002        *self >> rhs.0
2003    }
2004}
2005
2006impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&Aint<R, WIDTH>> for u8
2007where
2008    u8: core::ops::Shr<R, Output = u8>,
2009{
2010    type Output = Self;
2011
2012    fn shr(self, rhs: &Aint<R, WIDTH>) -> Self {
2013        self >> rhs.0
2014    }
2015}
2016
2017impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b Aint<R, WIDTH>> for &'a u8
2018where
2019    u8: core::ops::Shr<R, Output = u8>,
2020{
2021    type Output = u8;
2022
2023    fn shr(self, rhs: &'b Aint<R, WIDTH>) -> u8 {
2024        *self >> rhs.0
2025    }
2026}
2027
2028impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<Aint<R, WIDTH>> for u8
2029where
2030    u8: core::ops::ShrAssign<R>,
2031{
2032    fn shr_assign(&mut self, rhs: Aint<R, WIDTH>) {
2033        self.shr_assign(rhs.0)
2034    }
2035}
2036
2037impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&Aint<R, WIDTH>> for u8
2038where
2039    u8: core::ops::ShrAssign<R>,
2040{
2041    fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>) {
2042        self.shr_assign(rhs.0)
2043    }
2044}
2045
2046impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for u16
2047where
2048    u16: core::ops::Shr<R, Output = u16>,
2049{
2050    type Output = Self;
2051
2052    fn shr(self, rhs: Aint<R, WIDTH>) -> Self {
2053        self >> rhs.0
2054    }
2055}
2056
2057impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for &u16
2058where
2059    u16: core::ops::Shr<R, Output = u16>,
2060{
2061    type Output = u16;
2062
2063    fn shr(self, rhs: Aint<R, WIDTH>) -> u16 {
2064        *self >> rhs.0
2065    }
2066}
2067
2068impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&Aint<R, WIDTH>> for u16
2069where
2070    u16: core::ops::Shr<R, Output = u16>,
2071{
2072    type Output = Self;
2073
2074    fn shr(self, rhs: &Aint<R, WIDTH>) -> Self {
2075        self >> rhs.0
2076    }
2077}
2078
2079impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b Aint<R, WIDTH>> for &'a u16
2080where
2081    u16: core::ops::Shr<R, Output = u16>,
2082{
2083    type Output = u16;
2084
2085    fn shr(self, rhs: &'b Aint<R, WIDTH>) -> u16 {
2086        *self >> rhs.0
2087    }
2088}
2089
2090impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<Aint<R, WIDTH>> for u16
2091where
2092    u16: core::ops::ShrAssign<R>,
2093{
2094    fn shr_assign(&mut self, rhs: Aint<R, WIDTH>) {
2095        self.shr_assign(rhs.0)
2096    }
2097}
2098
2099impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&Aint<R, WIDTH>> for u16
2100where
2101    u16: core::ops::ShrAssign<R>,
2102{
2103    fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>) {
2104        self.shr_assign(rhs.0)
2105    }
2106}
2107
2108impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for u32
2109where
2110    u32: core::ops::Shr<R, Output = u32>,
2111{
2112    type Output = Self;
2113
2114    fn shr(self, rhs: Aint<R, WIDTH>) -> Self {
2115        self >> rhs.0
2116    }
2117}
2118
2119impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for &u32
2120where
2121    u32: core::ops::Shr<R, Output = u32>,
2122{
2123    type Output = u32;
2124
2125    fn shr(self, rhs: Aint<R, WIDTH>) -> u32 {
2126        *self >> rhs.0
2127    }
2128}
2129
2130impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&Aint<R, WIDTH>> for u32
2131where
2132    u32: core::ops::Shr<R, Output = u32>,
2133{
2134    type Output = Self;
2135
2136    fn shr(self, rhs: &Aint<R, WIDTH>) -> Self {
2137        self >> rhs.0
2138    }
2139}
2140
2141impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b Aint<R, WIDTH>> for &'a u32
2142where
2143    u32: core::ops::Shr<R, Output = u32>,
2144{
2145    type Output = u32;
2146
2147    fn shr(self, rhs: &'b Aint<R, WIDTH>) -> u32 {
2148        *self >> rhs.0
2149    }
2150}
2151
2152impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<Aint<R, WIDTH>> for u32
2153where
2154    u32: core::ops::ShrAssign<R>,
2155{
2156    fn shr_assign(&mut self, rhs: Aint<R, WIDTH>) {
2157        self.shr_assign(rhs.0)
2158    }
2159}
2160
2161impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&Aint<R, WIDTH>> for u32
2162where
2163    u32: core::ops::ShrAssign<R>,
2164{
2165    fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>) {
2166        self.shr_assign(rhs.0)
2167    }
2168}
2169
2170impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for u64
2171where
2172    u64: core::ops::Shr<R, Output = u64>,
2173{
2174    type Output = Self;
2175
2176    fn shr(self, rhs: Aint<R, WIDTH>) -> Self {
2177        self >> rhs.0
2178    }
2179}
2180
2181impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for &u64
2182where
2183    u64: core::ops::Shr<R, Output = u64>,
2184{
2185    type Output = u64;
2186
2187    fn shr(self, rhs: Aint<R, WIDTH>) -> u64 {
2188        *self >> rhs.0
2189    }
2190}
2191
2192impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&Aint<R, WIDTH>> for u64
2193where
2194    u64: core::ops::Shr<R, Output = u64>,
2195{
2196    type Output = Self;
2197
2198    fn shr(self, rhs: &Aint<R, WIDTH>) -> Self {
2199        self >> rhs.0
2200    }
2201}
2202
2203impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b Aint<R, WIDTH>> for &'a u64
2204where
2205    u64: core::ops::Shr<R, Output = u64>,
2206{
2207    type Output = u64;
2208
2209    fn shr(self, rhs: &'b Aint<R, WIDTH>) -> u64 {
2210        *self >> rhs.0
2211    }
2212}
2213
2214impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<Aint<R, WIDTH>> for u64
2215where
2216    u64: core::ops::ShrAssign<R>,
2217{
2218    fn shr_assign(&mut self, rhs: Aint<R, WIDTH>) {
2219        self.shr_assign(rhs.0)
2220    }
2221}
2222
2223impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&Aint<R, WIDTH>> for u64
2224where
2225    u64: core::ops::ShrAssign<R>,
2226{
2227    fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>) {
2228        self.shr_assign(rhs.0)
2229    }
2230}
2231
2232impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for u128
2233where
2234    u128: core::ops::Shr<R, Output = u128>,
2235{
2236    type Output = Self;
2237
2238    fn shr(self, rhs: Aint<R, WIDTH>) -> Self {
2239        self >> rhs.0
2240    }
2241}
2242
2243impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for &u128
2244where
2245    u128: core::ops::Shr<R, Output = u128>,
2246{
2247    type Output = u128;
2248
2249    fn shr(self, rhs: Aint<R, WIDTH>) -> u128 {
2250        *self >> rhs.0
2251    }
2252}
2253
2254impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&Aint<R, WIDTH>> for u128
2255where
2256    u128: core::ops::Shr<R, Output = u128>,
2257{
2258    type Output = Self;
2259
2260    fn shr(self, rhs: &Aint<R, WIDTH>) -> Self {
2261        self >> rhs.0
2262    }
2263}
2264
2265impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b Aint<R, WIDTH>> for &'a u128
2266where
2267    u128: core::ops::Shr<R, Output = u128>,
2268{
2269    type Output = u128;
2270
2271    fn shr(self, rhs: &'b Aint<R, WIDTH>) -> u128 {
2272        *self >> rhs.0
2273    }
2274}
2275
2276impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<Aint<R, WIDTH>> for u128
2277where
2278    u128: core::ops::ShrAssign<R>,
2279{
2280    fn shr_assign(&mut self, rhs: Aint<R, WIDTH>) {
2281        self.shr_assign(rhs.0)
2282    }
2283}
2284
2285impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&Aint<R, WIDTH>> for u128
2286where
2287    u128: core::ops::ShrAssign<R>,
2288{
2289    fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>) {
2290        self.shr_assign(rhs.0)
2291    }
2292}
2293
2294impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for usize
2295where
2296    usize: core::ops::Shr<R, Output = usize>,
2297{
2298    type Output = Self;
2299
2300    fn shr(self, rhs: Aint<R, WIDTH>) -> Self {
2301        self >> rhs.0
2302    }
2303}
2304
2305impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for &usize
2306where
2307    usize: core::ops::Shr<R, Output = usize>,
2308{
2309    type Output = usize;
2310
2311    fn shr(self, rhs: Aint<R, WIDTH>) -> usize {
2312        *self >> rhs.0
2313    }
2314}
2315
2316impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&Aint<R, WIDTH>> for usize
2317where
2318    usize: core::ops::Shr<R, Output = usize>,
2319{
2320    type Output = Self;
2321
2322    fn shr(self, rhs: &Aint<R, WIDTH>) -> Self {
2323        self >> rhs.0
2324    }
2325}
2326
2327impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b Aint<R, WIDTH>> for &'a usize
2328where
2329    usize: core::ops::Shr<R, Output = usize>,
2330{
2331    type Output = usize;
2332
2333    fn shr(self, rhs: &'b Aint<R, WIDTH>) -> usize {
2334        *self >> rhs.0
2335    }
2336}
2337
2338impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<Aint<R, WIDTH>> for usize
2339where
2340    usize: core::ops::ShrAssign<R>,
2341{
2342    fn shr_assign(&mut self, rhs: Aint<R, WIDTH>) {
2343        self.shr_assign(rhs.0)
2344    }
2345}
2346
2347impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&Aint<R, WIDTH>> for usize
2348where
2349    usize: core::ops::ShrAssign<R>,
2350{
2351    fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>) {
2352        self.shr_assign(rhs.0)
2353    }
2354}
2355
2356impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for i8
2357where
2358    i8: core::ops::Shr<R, Output = i8>,
2359{
2360    type Output = Self;
2361
2362    fn shr(self, rhs: Aint<R, WIDTH>) -> Self {
2363        self >> rhs.0
2364    }
2365}
2366
2367impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for &i8
2368where
2369    i8: core::ops::Shr<R, Output = i8>,
2370{
2371    type Output = i8;
2372
2373    fn shr(self, rhs: Aint<R, WIDTH>) -> i8 {
2374        *self >> rhs.0
2375    }
2376}
2377
2378impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&Aint<R, WIDTH>> for i8
2379where
2380    i8: core::ops::Shr<R, Output = i8>,
2381{
2382    type Output = Self;
2383
2384    fn shr(self, rhs: &Aint<R, WIDTH>) -> Self {
2385        self >> rhs.0
2386    }
2387}
2388
2389impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b Aint<R, WIDTH>> for &'a i8
2390where
2391    i8: core::ops::Shr<R, Output = i8>,
2392{
2393    type Output = i8;
2394
2395    fn shr(self, rhs: &'b Aint<R, WIDTH>) -> i8 {
2396        *self >> rhs.0
2397    }
2398}
2399
2400impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<Aint<R, WIDTH>> for i8
2401where
2402    i8: core::ops::ShrAssign<R>,
2403{
2404    fn shr_assign(&mut self, rhs: Aint<R, WIDTH>) {
2405        self.shr_assign(rhs.0)
2406    }
2407}
2408
2409impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&Aint<R, WIDTH>> for i8
2410where
2411    i8: core::ops::ShrAssign<R>,
2412{
2413    fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>) {
2414        self.shr_assign(rhs.0)
2415    }
2416}
2417
2418impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for i16
2419where
2420    i16: core::ops::Shr<R, Output = i16>,
2421{
2422    type Output = Self;
2423
2424    fn shr(self, rhs: Aint<R, WIDTH>) -> Self {
2425        self >> rhs.0
2426    }
2427}
2428
2429impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for &i16
2430where
2431    i16: core::ops::Shr<R, Output = i16>,
2432{
2433    type Output = i16;
2434
2435    fn shr(self, rhs: Aint<R, WIDTH>) -> i16 {
2436        *self >> rhs.0
2437    }
2438}
2439
2440impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&Aint<R, WIDTH>> for i16
2441where
2442    i16: core::ops::Shr<R, Output = i16>,
2443{
2444    type Output = Self;
2445
2446    fn shr(self, rhs: &Aint<R, WIDTH>) -> Self {
2447        self >> rhs.0
2448    }
2449}
2450
2451impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b Aint<R, WIDTH>> for &'a i16
2452where
2453    i16: core::ops::Shr<R, Output = i16>,
2454{
2455    type Output = i16;
2456
2457    fn shr(self, rhs: &'b Aint<R, WIDTH>) -> i16 {
2458        *self >> rhs.0
2459    }
2460}
2461
2462impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<Aint<R, WIDTH>> for i16
2463where
2464    i16: core::ops::ShrAssign<R>,
2465{
2466    fn shr_assign(&mut self, rhs: Aint<R, WIDTH>) {
2467        self.shr_assign(rhs.0)
2468    }
2469}
2470
2471impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&Aint<R, WIDTH>> for i16
2472where
2473    i16: core::ops::ShrAssign<R>,
2474{
2475    fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>) {
2476        self.shr_assign(rhs.0)
2477    }
2478}
2479
2480impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for i32
2481where
2482    i32: core::ops::Shr<R, Output = i32>,
2483{
2484    type Output = Self;
2485
2486    fn shr(self, rhs: Aint<R, WIDTH>) -> Self {
2487        self >> rhs.0
2488    }
2489}
2490
2491impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for &i32
2492where
2493    i32: core::ops::Shr<R, Output = i32>,
2494{
2495    type Output = i32;
2496
2497    fn shr(self, rhs: Aint<R, WIDTH>) -> i32 {
2498        *self >> rhs.0
2499    }
2500}
2501
2502impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&Aint<R, WIDTH>> for i32
2503where
2504    i32: core::ops::Shr<R, Output = i32>,
2505{
2506    type Output = Self;
2507
2508    fn shr(self, rhs: &Aint<R, WIDTH>) -> Self {
2509        self >> rhs.0
2510    }
2511}
2512
2513impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b Aint<R, WIDTH>> for &'a i32
2514where
2515    i32: core::ops::Shr<R, Output = i32>,
2516{
2517    type Output = i32;
2518
2519    fn shr(self, rhs: &'b Aint<R, WIDTH>) -> i32 {
2520        *self >> rhs.0
2521    }
2522}
2523
2524impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<Aint<R, WIDTH>> for i32
2525where
2526    i32: core::ops::ShrAssign<R>,
2527{
2528    fn shr_assign(&mut self, rhs: Aint<R, WIDTH>) {
2529        self.shr_assign(rhs.0)
2530    }
2531}
2532
2533impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&Aint<R, WIDTH>> for i32
2534where
2535    i32: core::ops::ShrAssign<R>,
2536{
2537    fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>) {
2538        self.shr_assign(rhs.0)
2539    }
2540}
2541
2542impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for i64
2543where
2544    i64: core::ops::Shr<R, Output = i64>,
2545{
2546    type Output = Self;
2547
2548    fn shr(self, rhs: Aint<R, WIDTH>) -> Self {
2549        self >> rhs.0
2550    }
2551}
2552
2553impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for &i64
2554where
2555    i64: core::ops::Shr<R, Output = i64>,
2556{
2557    type Output = i64;
2558
2559    fn shr(self, rhs: Aint<R, WIDTH>) -> i64 {
2560        *self >> rhs.0
2561    }
2562}
2563
2564impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&Aint<R, WIDTH>> for i64
2565where
2566    i64: core::ops::Shr<R, Output = i64>,
2567{
2568    type Output = Self;
2569
2570    fn shr(self, rhs: &Aint<R, WIDTH>) -> Self {
2571        self >> rhs.0
2572    }
2573}
2574
2575impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b Aint<R, WIDTH>> for &'a i64
2576where
2577    i64: core::ops::Shr<R, Output = i64>,
2578{
2579    type Output = i64;
2580
2581    fn shr(self, rhs: &'b Aint<R, WIDTH>) -> i64 {
2582        *self >> rhs.0
2583    }
2584}
2585
2586impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<Aint<R, WIDTH>> for i64
2587where
2588    i64: core::ops::ShrAssign<R>,
2589{
2590    fn shr_assign(&mut self, rhs: Aint<R, WIDTH>) {
2591        self.shr_assign(rhs.0)
2592    }
2593}
2594
2595impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&Aint<R, WIDTH>> for i64
2596where
2597    i64: core::ops::ShrAssign<R>,
2598{
2599    fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>) {
2600        self.shr_assign(rhs.0)
2601    }
2602}
2603
2604impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for i128
2605where
2606    i128: core::ops::Shr<R, Output = i128>,
2607{
2608    type Output = Self;
2609
2610    fn shr(self, rhs: Aint<R, WIDTH>) -> Self {
2611        self >> rhs.0
2612    }
2613}
2614
2615impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for &i128
2616where
2617    i128: core::ops::Shr<R, Output = i128>,
2618{
2619    type Output = i128;
2620
2621    fn shr(self, rhs: Aint<R, WIDTH>) -> i128 {
2622        *self >> rhs.0
2623    }
2624}
2625
2626impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&Aint<R, WIDTH>> for i128
2627where
2628    i128: core::ops::Shr<R, Output = i128>,
2629{
2630    type Output = Self;
2631
2632    fn shr(self, rhs: &Aint<R, WIDTH>) -> Self {
2633        self >> rhs.0
2634    }
2635}
2636
2637impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b Aint<R, WIDTH>> for &'a i128
2638where
2639    i128: core::ops::Shr<R, Output = i128>,
2640{
2641    type Output = i128;
2642
2643    fn shr(self, rhs: &'b Aint<R, WIDTH>) -> i128 {
2644        *self >> rhs.0
2645    }
2646}
2647
2648impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<Aint<R, WIDTH>> for i128
2649where
2650    i128: core::ops::ShrAssign<R>,
2651{
2652    fn shr_assign(&mut self, rhs: Aint<R, WIDTH>) {
2653        self.shr_assign(rhs.0)
2654    }
2655}
2656
2657impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&Aint<R, WIDTH>> for i128
2658where
2659    i128: core::ops::ShrAssign<R>,
2660{
2661    fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>) {
2662        self.shr_assign(rhs.0)
2663    }
2664}
2665
2666impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for isize
2667where
2668    isize: core::ops::Shr<R, Output = isize>,
2669{
2670    type Output = Self;
2671
2672    fn shr(self, rhs: Aint<R, WIDTH>) -> Self {
2673        self >> rhs.0
2674    }
2675}
2676
2677impl<R: Sealed, const WIDTH: u32> core::ops::Shr<Aint<R, WIDTH>> for &isize
2678where
2679    isize: core::ops::Shr<R, Output = isize>,
2680{
2681    type Output = isize;
2682
2683    fn shr(self, rhs: Aint<R, WIDTH>) -> isize {
2684        *self >> rhs.0
2685    }
2686}
2687
2688impl<R: Sealed, const WIDTH: u32> core::ops::Shr<&Aint<R, WIDTH>> for isize
2689where
2690    isize: core::ops::Shr<R, Output = isize>,
2691{
2692    type Output = Self;
2693
2694    fn shr(self, rhs: &Aint<R, WIDTH>) -> Self {
2695        self >> rhs.0
2696    }
2697}
2698
2699impl<'a, 'b, R: Sealed, const WIDTH: u32> core::ops::Shr<&'b Aint<R, WIDTH>> for &'a isize
2700where
2701    isize: core::ops::Shr<R, Output = isize>,
2702{
2703    type Output = isize;
2704
2705    fn shr(self, rhs: &'b Aint<R, WIDTH>) -> isize {
2706        *self >> rhs.0
2707    }
2708}
2709
2710impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<Aint<R, WIDTH>> for isize
2711where
2712    isize: core::ops::ShrAssign<R>,
2713{
2714    fn shr_assign(&mut self, rhs: Aint<R, WIDTH>) {
2715        self.shr_assign(rhs.0)
2716    }
2717}
2718
2719impl<R: Sealed, const WIDTH: u32> core::ops::ShrAssign<&Aint<R, WIDTH>> for isize
2720where
2721    isize: core::ops::ShrAssign<R>,
2722{
2723    fn shr_assign(&mut self, rhs: &Aint<R, WIDTH>) {
2724        self.shr_assign(rhs.0)
2725    }
2726}