Expand description
Checked strings containing Unicode identifiers according to the Unicode Standard Annex #31.
§Examples
use strck_ident::{IntoCk, unicode::UnicodeIdent};
assert!("foo".ck::<UnicodeIdent>().is_ok());
assert!("struct".ck::<UnicodeIdent>().is_ok());
assert!("Москва".ck::<UnicodeIdent>().is_ok());
assert!("東京".ck::<UnicodeIdent>().is_ok());
assert!("_identifier".ck::<UnicodeIdent>().is_err());
assert!("r#try".ck::<UnicodeIdent>().is_err());
assert!("👍".ck::<UnicodeIdent>().is_err());§Aliases
This module exposes Ident and IdentBuf, which alias Ck<UnicodeIdent>
and Check<UnicodeIdent> respectively. These aliases are preferred to keep
type signatures succinct.
These are also exported under the root, and can be accessed as
strck_ident::Ident and strck_ident::IdentBuf.
Structs§
- Unicode
Ident - An
Invariantfor unicode identifiers according to Unicode Standard Annex #31.
Enums§
- Error
- The error type returned from checking invariants of
UnicodeIdent.