[−][src]Trait sqlx_core::row::FromRow
A record that can be built from a row returned by the database.
In order to use query_as
the output type must implement FromRow
.
Deriving
This trait can be automatically derived by SQLx for any struct. The generated implementation
will consist of a sequence of calls to Row::try_get
using the name from each
struct field.
ⓘThis example is not tested
#[derive(sqlx::FromRow)] struct User { id: i32, name: String, }