impl_from_row

Macro impl_from_row 

Source
macro_rules! impl_from_row {
    ($type:ident { $($field:ident : $field_type:ty),* $(,)? }) => { ... };
}
Expand description

Macro to implement FromPgRow for simple structs.

Usage:

impl_from_row!(User {
    id: i32,
    email: String,
    name: Option<String>,
});