sosecrets_rs/
types.rs

1use crate::traits::{ChooseMinimallyRepresentableUInt, __private};
2
3impl __private::SealedTrait for NumericalZeroSizedType {}
4
5impl ChooseMinimallyRepresentableUInt for NumericalZeroSizedType {
6    type Output = NumericalZeroSizedType;
7    type AtomicOutput = NumericalZeroSizedType;
8
9    const ZERO: Self::Output = NumericalZeroSizedType {};
10    const ONE: Self::Output = NumericalZeroSizedType {};
11
12    fn cast_unsigned_to_self_type<T: typenum::Unsigned>(_: __private::SealedToken) -> Self::Output {
13        NumericalZeroSizedType {}
14    }
15}
16
17#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Default)]
18pub struct NumericalZeroSizedType {}
19
20impl core::ops::AddAssign<Self> for NumericalZeroSizedType {
21    fn add_assign(&mut self, _other: Self) {}
22}
23
24impl core::ops::Add<Self> for NumericalZeroSizedType {
25    type Output = Self;
26
27    fn add(self, _other: Self) -> Self::Output {
28        NumericalZeroSizedType {}
29    }
30}
31
32impl core::fmt::Display for NumericalZeroSizedType {
33    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
34        write!(f, "NumericalZeroSizedType")
35    }
36}