zvariant/serialized/
format.rs
1use static_assertions::assert_impl_all;
2
3#[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
5pub enum Format {
6 #[default]
9 DBus,
10 #[cfg(feature = "gvariant")]
12 GVariant,
13}
14
15assert_impl_all!(Format: Send, Sync, Unpin);
16
17impl std::fmt::Display for Format {
18 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
19 match self {
20 Format::DBus => write!(f, "D-Bus"),
21 #[cfg(feature = "gvariant")]
22 Format::GVariant => write!(f, "GVariant"),
23 }
24 }
25}