object_rainbow/impls/
infallible.rs1use typenum::U0;
2
3use crate::*;
4
5impl ToOutput for Infallible {
6 fn to_output(&self, _: &mut impl Output) {
7 match *self {}
8 }
9}
10
11impl InlineOutput for Infallible {}
12impl Tagged for Infallible {}
13impl ListHashes for Infallible {}
14impl Topological for Infallible {}
15
16impl Size for Infallible {
17 type Size = U0;
18 const SIZE: usize = 0;
19}
20
21impl MaybeHasNiche for Infallible {
22 type MnArray = SomeNiche<ZeroNiche<U0>>;
23}
24
25impl ByteOrd for Infallible {
26 fn bytes_cmp(&self, _: &Self) -> Ordering {
27 match *self {}
28 }
29}
30
31impl<I: ParseInput> Parse<I> for Infallible {
32 fn parse(_: I) -> crate::Result<Self> {
33 Err(Error::OutOfBounds)
34 }
35}
36
37impl<I: ParseInput> ParseInline<I> for Infallible {
38 fn parse_inline(_: &mut I) -> crate::Result<Self> {
39 Err(Error::OutOfBounds)
40 }
41}