memberlist-proto 0.3.3

Proto types and traits for the memberlist crate.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::{BrotliAlgorithm, ZstdCompressionLevel};
use quickcheck::{Arbitrary, Gen};

impl Arbitrary for ZstdCompressionLevel {
  fn arbitrary(g: &mut Gen) -> Self {
    let level = i8::arbitrary(g);
    ZstdCompressionLevel::from(level)
  }
}

impl Arbitrary for BrotliAlgorithm {
  fn arbitrary(g: &mut Gen) -> Self {
    let val = u8::arbitrary(g);
    BrotliAlgorithm::decode(val)
  }
}