1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
//! Contains an implementation of YAML serialization format. use serde_yaml; /// A representation of a YAML data. Use it as wrapper to /// set a format you want to use for conversion: /// /// ``` /// // Converts (lazy) data to a Yaml ///# use yew::format::Yaml; /// ///# fn dont_execute() { ///# let data: String = unimplemented!(); /// let dump = Yaml(&data); /// /// // Converts YAML string to a data (lazy). /// let Yaml(data) = dump; ///# } /// ``` #[derive(Debug)] pub struct Yaml<T>(pub T); text_format!(Yaml based on serde_yaml); binary_format!(Yaml based on serde_yaml);