actix-web-pagination
Pagination extractor for actix-web
.
```rust use actixweb::{App, HttpResponse, HttpServer}; use actixweb_pagination::Pagination;
async fn list(page: Pagination) -> HttpResponse { println!("page: {:?}", page); HttpResponse::Ok().finish() }
async fn main() -> actixweb::Result<()> { HttpServer::new(|| { App::new() .data(Pagination::config().defaultper_page(50)) .service(list) }) .bind("0.0.0.0:8080")? .run() .await?;
Ok(())
} ```