surrealpatch/tests/common/format.rs
2024-03-08 10:58:07 +00:00

18 lines
321 B
Rust

use std::{fmt, string::ToString};
#[derive(Debug, Copy, Clone)]
pub enum Format {
Json,
Cbor,
Pack,
}
impl fmt::Display for Format {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::Json => "json".fmt(f),
Self::Cbor => "cbor".fmt(f),
Self::Pack => "msgpack".fmt(f),
}
}
}