pub enum UnicodeVersion {
V9_0_0,
V10_0_0,
V11_0_0,
V12_0_0,
V12_1_0,
V13_0_0,
V14_0_0,
V15_0_0,
}
Expand description
Supported Unicode versions.
Variants§
V9_0_0
Unicode 9.0.0
V10_0_0
Unicode 10.0.0
V11_0_0
Unicode 11.0.0
V12_0_0
Unicode 12.0.0
V12_1_0
Unicode 12.1.0
V13_0_0
Unicode 13.0.0
V14_0_0
Unicode 14.0.0
V15_0_0
Unicode 15.0.0
Implementations§
Source§impl UnicodeVersion
impl UnicodeVersion
Sourcepub const fn latest() -> UnicodeVersion
pub const fn latest() -> UnicodeVersion
Get the latest Unicode version.
Sourcepub const fn table(self) -> &'static [&'static [Interval]]
pub const fn table(self) -> &'static [&'static [Interval]]
A sorted slice of slices where each item is a slice of intervals for every Unicode category. They are sorted alphabetically by their full name.
Sourcepub const fn intervals_for(
self,
category: UnicodeCategory,
) -> &'static [Interval] ⓘ
pub const fn intervals_for( self, category: UnicodeCategory, ) -> &'static [Interval] ⓘ
Get a slice of intervals for the provided Unicode category.
Sourcepub const fn normalized_categories(self) -> [UnicodeCategory; 30]
pub const fn normalized_categories(self) -> [UnicodeCategory; 30]
Unicode categories sorted by the number of intervals inside.
Sourcepub fn query<'a>(self) -> IntervalQuery<'a>
pub fn query<'a>(self) -> IntervalQuery<'a>
A Query builder for specifying the input parameters to intervals()
/ interval_set
methods.
Sourcepub fn intervals<'a>(
self,
include_categories: impl Into<Option<UnicodeCategorySet>>,
exclude_categories: impl Into<Option<UnicodeCategorySet>>,
include_characters: impl Into<Option<&'a str>>,
exclude_characters: impl Into<Option<&'a str>>,
min_codepoint: impl Into<Option<u32>>,
max_codepoint: impl Into<Option<u32>>,
) -> Result<Vec<Interval>, Error>
pub fn intervals<'a>( self, include_categories: impl Into<Option<UnicodeCategorySet>>, exclude_categories: impl Into<Option<UnicodeCategorySet>>, include_characters: impl Into<Option<&'a str>>, exclude_characters: impl Into<Option<&'a str>>, min_codepoint: impl Into<Option<u32>>, max_codepoint: impl Into<Option<u32>>, ) -> Result<Vec<Interval>, Error>
Find intervals matching the query.
§Errors
min_codepoint > max_codepoint
min_codepoint > 1114111
ormax_codepoint > 1114111
Sourcepub fn interval_set<'a>(
self,
include_categories: impl Into<Option<UnicodeCategorySet>>,
exclude_categories: impl Into<Option<UnicodeCategorySet>>,
include_characters: impl Into<Option<&'a str>>,
exclude_characters: impl Into<Option<&'a str>>,
min_codepoint: impl Into<Option<u32>>,
max_codepoint: impl Into<Option<u32>>,
) -> Result<IntervalSet, Error>
pub fn interval_set<'a>( self, include_categories: impl Into<Option<UnicodeCategorySet>>, exclude_categories: impl Into<Option<UnicodeCategorySet>>, include_characters: impl Into<Option<&'a str>>, exclude_characters: impl Into<Option<&'a str>>, min_codepoint: impl Into<Option<u32>>, max_codepoint: impl Into<Option<u32>>, ) -> Result<IntervalSet, Error>
Build an IndexSet
for the intervals matching the query.
§Errors
min_codepoint > max_codepoint
min_codepoint > 1114111
ormax_codepoint > 1114111
Trait Implementations§
Source§impl Clone for UnicodeVersion
impl Clone for UnicodeVersion
Source§fn clone(&self) -> UnicodeVersion
fn clone(&self) -> UnicodeVersion
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UnicodeVersion
impl Debug for UnicodeVersion
Source§impl Display for UnicodeVersion
impl Display for UnicodeVersion
Source§impl FromStr for UnicodeVersion
impl FromStr for UnicodeVersion
Source§impl Hash for UnicodeVersion
impl Hash for UnicodeVersion
Source§impl PartialEq for UnicodeVersion
impl PartialEq for UnicodeVersion
impl Copy for UnicodeVersion
impl Eq for UnicodeVersion
impl StructuralPartialEq for UnicodeVersion
Auto Trait Implementations§
impl Freeze for UnicodeVersion
impl RefUnwindSafe for UnicodeVersion
impl Send for UnicodeVersion
impl Sync for UnicodeVersion
impl Unpin for UnicodeVersion
impl UnwindSafe for UnicodeVersion
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