From e10df9cd479487c695ae5b728446a95cdd2016fc Mon Sep 17 00:00:00 2001 From: yassun7010 Date: Wed, 15 May 2024 19:03:13 +0900 Subject: [PATCH] chore: update docs. --- serde_valid/README.md | 12 ++++++------ serde_valid/src/lib.rs | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/serde_valid/README.md b/serde_valid/README.md index a50fa5d..b177228 100644 --- a/serde_valid/README.md +++ b/serde_valid/README.md @@ -65,12 +65,12 @@ Serde Valid support standard validation based JSON Schema. In addition, [serde_valid::utils][module@crate::utils] provides a type of validation not described in the JSON schema specification. -| Type | Serde Valid (validate derive) | Serde Valid (validation function) | -| :-------------------------------: | :-------------------------------------------------------- | :----------------------------------------------------------------------- | -| [Duration][`std::time::Duration`] | `#[validate(custom(duration_maximum(SECOND)))]` | [duration_maximum][`crate::utils::duration_maximum`] | -| [Duration][`std::time::Duration`] | `#[validate(custom(duration_minimum(ZERO)))]` | [duration_minimum][`crate::utils::duration_minimum`] | -| [Duration][`std::time::Duration`] | `#[validate(custom(duration_exclusive_maximum(SECOND)))]` | [duration_exclusive_maximum][`crate::utils::duration_exclusive_maximum`] | -| [Duration][`std::time::Duration`] | `#[validate(custom(duration_exclusive_minimum(ZERO)))]` | [duration_exclusive_minimum][`crate::utils::duration_exclusive_minimum`] | +| Type | Serde Valid (validate derive) | Serde Valid (validation function) | +| :------------------------------------------------------------------: | :-------------------------------------------------------- | :----------------------------------------------------------------------- | +| [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_maximum(SECOND)))]` | [duration_maximum][`crate::utils::duration_maximum`] | +| [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_minimum(ZERO)))]` | [duration_minimum][`crate::utils::duration_minimum`] | +| [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_exclusive_maximum(SECOND)))]` | [duration_exclusive_maximum][`crate::utils::duration_exclusive_maximum`] | +| [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_exclusive_minimum(ZERO)))]` | [duration_exclusive_minimum][`crate::utils::duration_exclusive_minimum`] | ## Complete Constructor (Deserialization) diff --git a/serde_valid/src/lib.rs b/serde_valid/src/lib.rs index f5dad87..12700ae 100644 --- a/serde_valid/src/lib.rs +++ b/serde_valid/src/lib.rs @@ -65,12 +65,12 @@ //! //! In addition, [serde_valid::utils][module@crate::utils] provides a type of validation not described in the JSON schema specification. //! -//! | Type | Serde Valid (validate derive) | Serde Valid (validation function) | -//! | :-------------------------------: | :-------------------------------------------------------- | :----------------------------------------------------------------------- | -//! | [Duration][`std::time::Duration`] | `#[validate(custom(duration_maximum(SECOND)))]` | [duration_maximum][`crate::utils::duration_maximum`] | -//! | [Duration][`std::time::Duration`] | `#[validate(custom(duration_minimum(ZERO)))]` | [duration_minimum][`crate::utils::duration_minimum`] | -//! | [Duration][`std::time::Duration`] | `#[validate(custom(duration_exclusive_maximum(SECOND)))]` | [duration_exclusive_maximum][`crate::utils::duration_exclusive_maximum`] | -//! | [Duration][`std::time::Duration`] | `#[validate(custom(duration_exclusive_minimum(ZERO)))]` | [duration_exclusive_minimum][`crate::utils::duration_exclusive_minimum`] | +//! | Type | Serde Valid (validate derive) | Serde Valid (validation function) | +//! | :------------------------------------------------------------------: | :-------------------------------------------------------- | :----------------------------------------------------------------------- | +//! | [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_maximum(SECOND)))]` | [duration_maximum][`crate::utils::duration_maximum`] | +//! | [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_minimum(ZERO)))]` | [duration_minimum][`crate::utils::duration_minimum`] | +//! | [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_exclusive_maximum(SECOND)))]` | [duration_exclusive_maximum][`crate::utils::duration_exclusive_maximum`] | +//! | [Duration](https://doc.rust-lang.org/core/time/struct.Duration.html) | `#[validate(custom(duration_exclusive_minimum(ZERO)))]` | [duration_exclusive_minimum][`crate::utils::duration_exclusive_minimum`] | //! //! ## Complete Constructor (Deserialization) //!