Skip to content

Commit

Permalink
Add docs on nutype macro
Browse files Browse the repository at this point in the history
  • Loading branch information
greyblake committed Nov 19, 2023
1 parent 09a117a commit 49cfc86
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nutype_macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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,
Expand Down

0 comments on commit 49cfc86

Please sign in to comment.