pub mod cbor;
pub mod flatbuffers;
pub mod json;
pub const PROTOCOLS: [&str; 3] = [
"json", "cbor", "flatbuffers", ];
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub enum Format {
Json, Cbor, Flatbuffers, Unsupported, }
impl From<&str> for Format {
fn from(v: &str) -> Self {
match v {
"json" => Format::Json,
"cbor" => Format::Cbor,
"flatbuffers" => Format::Flatbuffers,
_ => Format::Unsupported,
}
}
}