starlane-space 0.3.19

The 'Space' portion of starlane as opposed to hyperspace. This is where 3rd parties customize Starlane's behavior with WebAssembly and external executables. To develop a starlane driver please look in `./starlane` which holds the 'hyperspace' code (which provides infrastructure)"
Documentation
use serde::{Deserialize, Serialize};

use crate::space::util::ValueMatcher;
use crate::space::wave::core::hyper::HypMethod;

#[derive(
    Debug,
    Clone,
    Serialize,
    Deserialize,
    Eq,
    PartialEq,
    Hash,
    strum_macros::Display,
    strum_macros::EnumString,
)]
pub enum CmdMethod {
    Init,
    Read,
    Update,
    Bounce,
    Knock,
    Greet,
    Command,
    RawCommand,
    Log,
}
impl Default for CmdMethod{
    fn default() -> Self {
        Self::Init
    }
}

impl ValueMatcher<CmdMethod> for CmdMethod {
    fn is_match(&self, x: &CmdMethod) -> Result<(), ()> {
        if *x == *self {
            Ok(())
        } else {
            Err(())
        }
    }
}