pub trait ToYamlString {
fn to_yaml_string(&self) -> Result<String, serde_yaml::Error>;
}
impl<T> ToYamlString for T
where
T: serde::Serialize + crate::Validate,
{
fn to_yaml_string(&self) -> Result<String, serde_yaml::Error> {
serde_yaml::to_string(self)
}
}
impl ToYamlString for serde_yaml::Value {
fn to_yaml_string(&self) -> Result<String, serde_yaml::Error> {
serde_yaml::to_string(self)
}
}