1#[repr(transparent)]
3#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
4pub struct Icmpv6Type(u8);
5
6impl Icmpv6Type {
7 pub const DESTINATION_UNREACHABLE: Self = Self(1);
9 pub const PACKET_TOO_BIG: Self = Self(2);
11 pub const TIME_EXCEEDED: Self = Self(3);
13 pub const PARAMETER_PROBLEM: Self = Self(4);
15 pub const ECHO_REQUEST: Self = Self(128);
17 pub const ECHO_REPLY: Self = Self(129);
19
20 #[inline]
22 pub const fn new(raw: u8) -> Self {
23 Self(raw)
24 }
25
26 #[inline]
28 pub const fn raw(self) -> u8 {
29 self.0
30 }
31}