[][src]Derive Macro diesel::prelude::Queryable

    // Attributes available to this derive:

Implements Queryable

This trait can only be derived for structs, not enums.

When this trait is derived, it will assume that the order of fields on your struct match the order of the fields in the query. This means that field order is significant if you are using #[derive(Queryable)]. Field name has no effect.

To provide custom deserialization behavior for a field, you can use #[diesel(deserialize_as = "SomeType")]. If this attribute is present, Diesel will deserialize the corresponding field into SomeType, rather than the actual field type on your struct and then call .into to convert it to the actual field type. This can be used to add custom behavior for a single field, or use types that are otherwise unsupported by Diesel.


Optional field attributes: