+impl MessageType {
+ /// Returns whether the message type is even, indicating both endpoints must support it.
+ pub fn is_even(&self) -> bool {
+ (self.0 & 1) == 0
+ }
+}
+
+impl ::std::fmt::Display for MessageType {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ write!(f, "{}", self.0)
+ }
+}
+