pub enum SerializationFormat {
Json,
Yaml,
Toml,
}Expand description
An enumeration of first-class supported serialization formats.
Variants§
Implementations§
Source§impl SerializationFormat
impl SerializationFormat
Sourcepub fn to_string(&self, data: &impl Serialize) -> Result<String, Error>
pub fn to_string(&self, data: &impl Serialize) -> Result<String, Error>
Converts any serde::Serialize data to a serialized string.
Sourcepub fn from_str<T: DeserializeOwned>(&self, s: &str) -> Result<T, Error>
pub fn from_str<T: DeserializeOwned>(&self, s: &str) -> Result<T, Error>
Parse string s.
Auto Trait Implementations§
impl Freeze for SerializationFormat
impl RefUnwindSafe for SerializationFormat
impl Send for SerializationFormat
impl Sync for SerializationFormat
impl Unpin for SerializationFormat
impl UnwindSafe for SerializationFormat
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