Skip to main content

rsiot/serde_utils/
serde_alg_kind.rs

1// ANCHOR: SerdeAlgKind
2/// Формат сериализации / десериализации
3#[derive(Clone, Copy, Debug, Default, PartialEq)]
4pub enum SerdeAlgKind {
5    /// CBOR
6    ///
7    /// Необходимо активировать feature `serde_cbor`
8    #[cfg(feature = "serde_cbor")]
9    Cbor,
10
11    /// JSON
12    ///
13    /// Необходимо активировать feature `serde_json`
14    #[cfg(feature = "serde_json")]
15    Json,
16
17    /// MessagePack
18    ///
19    /// Необходимо активировать feature `serde_messagepack`
20    #[cfg(feature = "serde_messagepack")]
21    MessagePack,
22
23    /// Postcard
24    ///
25    /// Необходимо активировать feature `serde_postcard`
26    #[cfg(feature = "serde_postcard")]
27    Postcard,
28
29    /// TOML
30    ///
31    /// Необходимо активировать feature `serde_toml`
32    #[cfg(feature = "serde_toml")]
33    Toml,
34
35    /// Алгоритм не задан
36    #[default]
37    Unspecified,
38}
39// ANCHOR: SerdeAlgKind