From 49cfc86b741679a4601691e02e719408cc3a2ffc Mon Sep 17 00:00:00 2001 From: Serhii Potapov Date: Sun, 19 Nov 2023 16:26:13 +0100 Subject: [PATCH] Add docs on nutype macro --- nutype_macros/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nutype_macros/src/lib.rs b/nutype_macros/src/lib.rs index 3a3d235..a539873 100644 --- a/nutype_macros/src/lib.rs +++ b/nutype_macros/src/lib.rs @@ -1,3 +1,9 @@ +//! Macro implementations for `nutype` crate. +//! +//! Don't use this crate directly, use `nutype` instead. +//! +//! For more information please refer to [nutype](https://docs.rs/nutype) documentation. + mod any; mod common; mod float; @@ -14,6 +20,9 @@ use integer::{models::IntegerInnerType, IntegerNewtype}; use proc_macro2::TokenStream; use string::StringNewtype; +/// Defines sanitizers and validators on a newtype. +/// Guarantees that the type can be instantiated only with valid values. +/// See the documentation for [nutype](https://docs.rs/nutype) crate for more information. #[proc_macro_attribute] pub fn nutype( attrs: proc_macro::TokenStream,