mae 0.3.14

Opinionated async Rust framework for building Mae-Technologies micro-services — app scaffolding, repo layer, middleware, and test utilities.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::repo::implement::ToField;
use serde::Deserialize;

#[derive(Deserialize)]
pub struct ListQuery<Q, F: ToField> {
    pub limit: Option<u32>,
    pub offset: Option<u32>,
    pub filter: Q,
    pub sort_by: Option<Vec<F>>
}

impl<Q, F: ToField> ListQuery<Q, F> {
    pub fn new(filter: Q) -> anyhow::Result<Self> {
        Ok(Self { filter, offset: None, sort_by: None, limit: None })
    }
}