From ba3b23a419d72491e4c19c92e71d1d73a4477bf6 Mon Sep 17 00:00:00 2001 From: gengteng Date: Tue, 6 Jun 2023 13:53:47 +0800 Subject: [PATCH] update --- Cargo.toml | 4 ++-- src/lib.rs | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 830aefa..e64b6be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "axum-valid" -version = "0.2.0" -description = "Validator for axum" +version = "0.2.1" +description = "Validation tools for axum using the validator library." authors = ["GengTeng "] license = "MIT" homepage = "https://github.com/gengteng/axum-valid" diff --git a/src/lib.rs b/src/lib.rs index ae6b69e..92ce405 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,6 @@ +#![doc = include_str!("../README.md")] +#![deny(unsafe_code, missing_docs, clippy::unwrap_used)] + use axum::extract::rejection::{FormRejection, JsonRejection, PathRejection, QueryRejection}; use axum::extract::{FromRequest, FromRequestParts, Path, Query}; use axum::http::request::Parts; @@ -13,7 +16,9 @@ pub struct Valid(pub T); /// If the valid extractor fails it'll use this "rejection" type. /// This rejection type can be converted into a response. pub enum ValidRejection { + /// Validation errors Valid(ValidationErrors), + /// Inner extractor error Inner(E), }