restqs 0.1.0

REST Query Syntax parser for safe REST API filtering plans.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![allow(missing_docs)]

use restqs::{FieldCatalog, RqsError, parse};

fn main() -> Result<(), RqsError> {
    let catalog = FieldCatalog::new()
        .allow_integer("age", "users.age")?
        .allow_text("status", "users.status")?;

    let query = parse("age>=18&status=in(active,pending)&limit=25", &catalog)?;

    println!("{query:#?}");
    Ok(())
}