Trait ot_certs::template::subst::ConvertValue
source · pub trait ConvertValue<T>where
Self: Sized,{
// Required methods
fn convert(&self, convert: &Option<Conversion>) -> Result<T>;
fn unconvert(val: &T) -> Result<Self>;
}
Expand description
Trait to implement conversion from the raw (h)json data to structured data. This is used to implement variable
substitution in Subst
.
Required Methods§
sourcefn convert(&self, convert: &Option<Conversion>) -> Result<T>
fn convert(&self, convert: &Option<Conversion>) -> Result<T>
Convert from fraw data to structured data (i.e. deserialize). Optionally provide
an indication of how the data should first be parsed and how it should be converted
to the type T
.