Commit 9d7c7543 authored by Cyril Plisko's avatar Cyril Plisko

Add Template::yaml

parent e9bcec15
......@@ -112,11 +112,16 @@ impl Template {
}
pub fn json(&self) -> String {
serde_json::to_string(self).expect("Resource must be serializable")
serde_json::to_string(self).expect("Template must be serializable")
}
pub fn json_pretty(&self) -> String {
serde_json::to_string_pretty(self).expect("Resource must be serializable")
serde_json::to_string_pretty(self).expect("Template must be serializable")
}
#[cfg(feature = "yaml")]
pub fn yaml(&self) -> String {
serde_yaml::to_string(self).expect("Template must be serializable")
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment