cosmic_space/wave/core/
hyp.rs

1use serde::{Deserialize, Serialize};
2
3use crate::util::ValueMatcher;
4
5#[derive(
6    Debug,
7    Clone,
8    Serialize,
9    Deserialize,
10    Eq,
11    PartialEq,
12    Hash,
13    strum_macros::Display,
14    strum_macros::EnumString,
15)]
16pub enum HypMethod {
17    Assign,
18    Host,
19    Provision,
20    Knock,
21    Hop,
22    Transport,
23    HyperWave,
24    Search,
25}
26
27impl ValueMatcher<HypMethod> for HypMethod {
28    fn is_match(&self, x: &HypMethod) -> Result<(), ()> {
29        if *x == *self {
30            Ok(())
31        } else {
32            Err(())
33        }
34    }
35}