(&self)
| 15 | } |
| 16 | impl LegacyPrefix { |
| 17 | pub fn as_byte(&self) -> u8 { |
| 18 | match self { |
| 19 | Self::Group1(p) => *p as u8, |
| 20 | Self::Group2(p) => *p as u8, |
| 21 | Self::Group3(p) => *p as u8, |
| 22 | } |
| 23 | } |
| 24 | } |
| 25 | impl Distribution<LegacyPrefix> for Standard { |
| 26 | fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> LegacyPrefix { |