Query

Derive Macro Query 

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

Derive macro for query parameter types.

Generates FromQuery implementation.

#[derive(Query)]
pub struct ListQuery {
    #[field(default = 1)]
    pub page: u32,

    #[field(default = 20, max = 100)]
    pub limit: u32,

    pub search: Option<String>,
}