Skip to main content

FromSql

Derive Macro FromSql 

Source
#[derive(FromSql)]
{
    // Attributes available to this derive:
    #[sentinel]
}
Expand description

Derive FromSql for a newtype wrapper.

The struct must have exactly one field that implements FromSql.

§Example

use sentinel_derive::FromSql;

#[derive(FromSql)]
struct UserId(i32);