pub enum Unicode {}Expand description
A Unicode Standard Annex #31 profile (with LOW LINE removed).
§Character Set
This profile uses the unicode-ident crate.
- Start => any character that passes
is_xid_start(c). - Continue => any character that passes
is_xid_continue(c)(except LOW LINE).
§About Low Line Omission
It’s confusing if the character profile contains a delimiter.
Instead, if you want an identifier that includes the low-line character, you should select such an identifier (from the presets, or by including it as a delimiter in a custom identifier).
We still “include” the character, we just want it to be treated specially.
Trait Implementations§
impl CharProfile for Unicode
Source§impl Profile for Unicode
impl Profile for Unicode
Source§const APPEND_CLOSED: AppendClosed = AppendClosed::Fragment
const APPEND_CLOSED: AppendClosed = AppendClosed::Fragment
Whether or not a fragment containing characters in this profile are
append-closed. Read more
Source§type CharProfile = Unicode
type CharProfile = Unicode
The underlying character profile that this profile is based on. Read more
Source§type Segmentation = Grapheme
type Segmentation = Grapheme
The segmentation strategy that this profile uses. Read more
Source§fn is_chunk_char(c: char) -> bool
fn is_chunk_char(c: char) -> bool
Whether or not the provided character can appear at any point in a
chunk. Read more
Source§fn is_chunk_continue(c: char) -> bool
fn is_chunk_continue(c: char) -> bool
Whether or not the provided character is valid at any position after the
first character of a chunk (a run of non-delimiter characters).
impl SubsetOf<Unicode> for Strict
Proof: Strict is a subset of the Unicode profile (strict has more restrictions).
impl SubsetOf<Unicode> for Ascii
Proof: ASCII is an obvious subset of Unicode.
impl SubsetOf<Unicode> for Unicode
Proof: It’s always safe to implement this against yourself.
Auto Trait Implementations§
impl Freeze for Unicode
impl RefUnwindSafe for Unicode
impl Send for Unicode
impl Sync for Unicode
impl Unpin for Unicode
impl UnsafeUnpin for Unicode
impl UnwindSafe for Unicode
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