Lines Matching refs:Bounded
230 pub struct Bounded<T: Integer, const N: u32>(T); struct
238 impl<const N: u32> Bounded<$type, N> { impl
276 impl<T, const N: u32> Bounded<T, N> implementation
408 pub const fn extend<const M: u32>(self) -> Bounded<T, M> { in extend()
418 unsafe { Bounded::__new(self.0) } in extend()
439 pub fn try_shrink<const M: u32>(self) -> Option<Bounded<T, M>> { in try_shrink()
440 Bounded::<T, M>::try_new(self.get()) in try_shrink()
462 pub fn cast<U>(self) -> Bounded<U, N> in cast()
474 unsafe { Bounded::__new(value) } in cast()
478 impl<T, const N: u32> Deref for Bounded<T, N> implementation
515 fn try_into_bounded(self) -> Option<Bounded<T, N>>; in try_into_bounded()
524 fn try_into_bounded(self) -> Option<Bounded<T, N>> { in try_into_bounded()
525 self.try_into().ok().and_then(Bounded::try_new) in try_into_bounded()
531 impl<T, U, const N: u32, const M: u32> PartialEq<Bounded<U, M>> for Bounded<T, N> implementation
537 fn eq(&self, other: &Bounded<U, M>) -> bool { in eq()
542 impl<T, const N: u32> Eq for Bounded<T, N> where T: Integer {} implementation
544 impl<T, U, const N: u32, const M: u32> PartialOrd<Bounded<U, M>> for Bounded<T, N> implementation
550 fn partial_cmp(&self, other: &Bounded<U, M>) -> Option<cmp::Ordering> { in partial_cmp()
555 impl<T, const N: u32> Ord for Bounded<T, N> implementation
567 impl<T, const N: u32> PartialEq<T> for Bounded<T, N> implementation
577 impl<T, const N: u32> PartialOrd<T> for Bounded<T, N> implementation
589 impl<T, const N: u32, const M: u32> ops::Add<Bounded<T, M>> for Bounded<T, N> implementation
596 fn add(self, rhs: Bounded<T, M>) -> Self::Output { in add()
601 impl<T, const N: u32, const M: u32> ops::BitAnd<Bounded<T, M>> for Bounded<T, N> implementation
608 fn bitand(self, rhs: Bounded<T, M>) -> Self::Output { in bitand()
613 impl<T, const N: u32, const M: u32> ops::BitOr<Bounded<T, M>> for Bounded<T, N> implementation
620 fn bitor(self, rhs: Bounded<T, M>) -> Self::Output { in bitor()
625 impl<T, const N: u32, const M: u32> ops::BitXor<Bounded<T, M>> for Bounded<T, N> implementation
632 fn bitxor(self, rhs: Bounded<T, M>) -> Self::Output { in bitxor()
637 impl<T, const N: u32, const M: u32> ops::Div<Bounded<T, M>> for Bounded<T, N> implementation
644 fn div(self, rhs: Bounded<T, M>) -> Self::Output { in div()
649 impl<T, const N: u32, const M: u32> ops::Mul<Bounded<T, M>> for Bounded<T, N> implementation
656 fn mul(self, rhs: Bounded<T, M>) -> Self::Output { in mul()
661 impl<T, const N: u32, const M: u32> ops::Rem<Bounded<T, M>> for Bounded<T, N> implementation
668 fn rem(self, rhs: Bounded<T, M>) -> Self::Output { in rem()
673 impl<T, const N: u32, const M: u32> ops::Sub<Bounded<T, M>> for Bounded<T, N> implementation
680 fn sub(self, rhs: Bounded<T, M>) -> Self::Output { in sub()
687 impl<T, const N: u32> ops::Add<T> for Bounded<T, N> implementation
699 impl<T, const N: u32> ops::BitAnd<T> for Bounded<T, N> implementation
711 impl<T, const N: u32> ops::BitOr<T> for Bounded<T, N> implementation
723 impl<T, const N: u32> ops::BitXor<T> for Bounded<T, N> implementation
735 impl<T, const N: u32> ops::Div<T> for Bounded<T, N> implementation
747 impl<T, const N: u32> ops::Mul<T> for Bounded<T, N> implementation
759 impl<T, const N: u32> ops::Neg for Bounded<T, N> implementation
771 impl<T, const N: u32> ops::Not for Bounded<T, N> implementation
783 impl<T, const N: u32> ops::Rem<T> for Bounded<T, N> implementation
795 impl<T, const N: u32> ops::Sub<T> for Bounded<T, N> implementation
809 impl<T, const N: u32> fmt::Display for Bounded<T, N> implementation
819 impl<T, const N: u32> fmt::Binary for Bounded<T, N> implementation
829 impl<T, const N: u32> fmt::LowerExp for Bounded<T, N> implementation
839 impl<T, const N: u32> fmt::LowerHex for Bounded<T, N> implementation
849 impl<T, const N: u32> fmt::Octal for Bounded<T, N> implementation
859 impl<T, const N: u32> fmt::UpperExp for Bounded<T, N> implementation
869 impl<T, const N: u32> fmt::UpperHex for Bounded<T, N> implementation
885 impl<T> $trait for Bounded<T, $num_bits> where T: Integer {}
943 impl<T, const N: u32> From<$type> for Bounded<T, N>
1019 impl<T, const N: u32> From<Bounded<T, N>> for $type
1023 Bounded<T, N>: FitsInXBits<{ <$type as Integer>::BITS as usize }>,
1025 fn from(value: Bounded<T, N>) -> $type {
1043 impl<T> From<Bounded<T, 1>> for bool
1047 fn from(value: Bounded<T, 1>) -> Self { in from()
1052 impl<T, const N: u32> From<bool> for Bounded<T, N> implementation