Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs on nutype macro #102

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading