Enum gds::SerializationFormat
source · 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 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