pub trait DataConvertTo<T> {
// Required method
fn convert(
&self,
options: &DataConversionOptions,
) -> DataConversionResult<T>;
}Expand description
Trait implemented by DataConverter for each supported target type.
Required Methods§
Sourcefn convert(&self, options: &DataConversionOptions) -> DataConversionResult<T>
fn convert(&self, options: &DataConversionOptions) -> DataConversionResult<T>
Converts the source value to T.
§Parameters
options- Conversion options used for parsing source content.
§Returns
Returns the converted target value.
§Errors
Returns a super::DataConversionError when the conversion is
unsupported, the source value is empty, or the source content is invalid
for T.