pub trait FromAthena: Sized {
// Required method
fn from_athena(values: HashMap<String, String>) -> Result<Self, Error>;
}
Expand description
A trait for converting data from an Athena query result into a specified type.
This trait defines a method from_athena
which converts a HashMap of string
key-value pairs representing data retrieved from an Athena query into an instance
of the implementing type. The conversion process may involve parsing, validation,
or any other necessary transformation.
§Errors
If the conversion process fails due to invalid or missing data, an error is returned.
§Examples
Implementing FromAthena
for a custom struct:
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.