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