pub struct Ascii;Expand description
Accepts strings whose characters are all ASCII.
An empty string passes (it has no non-ASCII characters). Combine with
NonEmpty if you also require content.
§Examples
use type_lib::rules::Ascii;
use type_lib::Validator;
assert!(Ascii::validate("plain-text_123").is_ok());
assert!(Ascii::validate("café").is_err());Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ascii
impl RefUnwindSafe for Ascii
impl Send for Ascii
impl Sync for Ascii
impl Unpin for Ascii
impl UnsafeUnpin for Ascii
impl UnwindSafe for Ascii
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more