Enum stam::DataFormat
source · pub enum DataFormat {
Json {
compact: bool,
},
CBOR,
Csv,
}Expand description
Data formats for serialisation and deserialisation supported by the library.
Variants§
Json
STAM JSON, see the specification
The canonical extension used by the library is .stam.json.
CBOR
Concise Binary Object Representation, a binary format suitable for quick loading and saving, as it also holds all indices (unlike STAM JSON/CSV). This should be used for caching only and not as a data interchange storage format as the format changes per version of this library (and may even differ based on compile-time options).
The canonical extension used by the library is .stam.cbor.
Csv
STAM CSV, see the specification
The canonical extension used by the library is .stam.csv.
Trait Implementations§
source§impl Clone for DataFormat
impl Clone for DataFormat
source§fn clone(&self) -> DataFormat
fn clone(&self) -> DataFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for DataFormat
impl Debug for DataFormat
source§impl<'bytes, Ctx> Decode<'bytes, Ctx> for DataFormat
impl<'bytes, Ctx> Decode<'bytes, Ctx> for DataFormat
source§impl<'de> Deserialize<'de> for DataFormat
impl<'de> Deserialize<'de> for DataFormat
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for DataFormat
impl Display for DataFormat
source§impl<Ctx> Encode<Ctx> for DataFormat
impl<Ctx> Encode<Ctx> for DataFormat
source§impl PartialEq for DataFormat
impl PartialEq for DataFormat
source§fn eq(&self, other: &DataFormat) -> bool
fn eq(&self, other: &DataFormat) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for DataFormat
impl Serialize for DataFormat
source§impl TryFrom<&str> for DataFormat
impl TryFrom<&str> for DataFormat
impl Copy for DataFormat
impl StructuralPartialEq for DataFormat
Auto Trait Implementations§
impl RefUnwindSafe for DataFormat
impl Send for DataFormat
impl Sync for DataFormat
impl Unpin for DataFormat
impl UnwindSafe for DataFormat
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more