Macro diesel::Queryable [] [src]

macro_rules! Queryable {
    ($($args:tt)*) => { ... };
}

Implements the Queryable trait for a given struct. This macro should be called by copy/pasting the definition of the struct into it.

Example

struct User {
    name: String,
    hair_color: Option<String>,
}

Queryable! {
    struct User {
        name: String,
        hair_color: Option<String>,
    }
}