#[derive(FromAthena)]
Expand description
Converts data from an Athena query result into a struct implementing the FromAthena
trait.
This function takes a TokenStream representing the input Rust code and generates
the necessary implementation of the FromAthena
trait for the specified struct.
§Arguments
input
- A TokenStream representing the input Rust code to deriveFromAthena
.
§Returns
A TokenStream containing the generated implementation of the FromAthena
trait for the specified struct.
If the input struct does not have named fields, an error TokenStream is returned.
§Examples
use aws_athena_parser::{from_athena, FromAthena};
#[derive(FromAthena)]
struct MyStruct {
field1: String,
field2: i32,
}