greyblake/nutype

Rust newtype with guarantees πŸ‡ΊπŸ‡¦ πŸ¦€

RustJustrustsanitizationdatavalidationwebvalidatormacrosdata-structuresrust-langrust-libraryinvariantsmacroinvariantsanitizernewtypetypesafetyinvariance
This is stars and forks stats for /greyblake/nutype repository. As of 28 Apr, 2024 this repository has 845 stars and 11 forks.

The newtype with guarantees. Philosophy Nutype embraces the simple idea: the type system can be leveraged to track the fact that something was done, so there is no need to do it again. If a piece of data was once sanitized and validated we can rely on the types instead of sanitizing and validating again and again when we're in doubt. Quick start use nutype::nutype; #[nutype( sanitize(trim, lowercase) validate(not_empty, max_len = 20) )] pub struct Username(String); Now we can create usernames: assert_eq!( ...
Read on GithubGithub Stats Page
repotechsstarsweeklyforksweekly
AlexAltea/milli-pyRustPython118020
shramee/starklings-cairo1CairoRust312+5145+6
Rakesh9100/Click-The-Edible-GameHTMLCSSJavaScript19+1360
odis-labs/helixOCamlReasonHTML42000
tandasat/Hypervisor-101-in-RustRustAssemblyPython8300500
Privoce/vocechat-server-rustRustHTMLShell222+246+1
paritytech/cumulusRustShellHTML62503980
byrd-polar/fluid-earthJavaScriptSvelteGLSL930160
johnlui/PPHCRust2.8k02510
OWASP/API-SecurityDockerfile1.8k03640