sleep_parser/
protocol_version.rs

1/// SLEEP Protocol version.
2#[derive(Debug, PartialEq)]
3pub enum ProtocolVersion {
4  /// The version specified as per the paper released in 2017-09.
5  V0,
6}
7
8impl ProtocolVersion {
9  /// Returns true if the version is `V0`.
10  #[inline]
11  pub fn is_v0(&self) -> bool {
12    *self == ProtocolVersion::V0
13  }
14}