[go: up one dir, main page]

Module garde::rules::ascii

source ·
Expand description

ASCII validation.

#[derive(garde::Validate)]
struct Test {
    #[garde(ascii)]
    v: String,
}

The entrypoint is the Ascii trait. Implementing this trait for a type allows that type to be used with the #[garde(ascii)] rule.

This trait has a blanket implementation for all T: AsRef<str>.

Traits

Functions