pub struct Codepoint { /* private fields */ }Expand description
A Unicode code point (not necessarily a scalar value: lone surrogates and values above U+10FFFF can be represented, as upstream).
Implementations§
Source§impl Codepoint
impl Codepoint
Sourcepub const REPLACEMENT_CODEPOINT: Codepoint
pub const REPLACEMENT_CODEPOINT: Codepoint
The replacement codepoint that is used for non supported values.
Sourcepub const fn replacement_codepoint() -> Codepoint
pub const fn replacement_codepoint() -> Codepoint
The replacement codepoint that is used for non supported values.
Sourcepub const fn new(value: u32) -> Self
pub const fn new(value: u32) -> Self
Creates a new instance of Codepoint with the specified value.
Sourcepub fn general_category(self) -> GeneralCategory
pub fn general_category(self) -> GeneralCategory
Gets the GeneralCategory.
Sourcepub fn bi_di_class(self) -> BidiClass
pub fn bi_di_class(self) -> BidiClass
Gets the BidiClass.
Sourcepub fn paired_bracket_type(self) -> BidiPairedBracketType
pub fn paired_bracket_type(self) -> BidiPairedBracketType
Gets the BidiPairedBracketType.
Sourcepub fn line_break_class(self) -> LineBreakClass
pub fn line_break_class(self) -> LineBreakClass
Gets the LineBreakClass.
Sourcepub fn word_break_class(self) -> WordBreakClass
pub fn word_break_class(self) -> WordBreakClass
Gets the WordBreakClass.
Sourcepub fn sentence_break_class(self) -> SentenceBreakClass
pub fn sentence_break_class(self) -> SentenceBreakClass
Gets the SentenceBreakClass (UAX #29).
Sourcepub fn grapheme_break_class(self) -> GraphemeBreakClass
pub fn grapheme_break_class(self) -> GraphemeBreakClass
Gets the GraphemeBreakClass.
Sourcepub fn east_asian_width_class(self) -> EastAsianWidthClass
pub fn east_asian_width_class(self) -> EastAsianWidthClass
Gets the EastAsianWidthClass.
Sourcepub fn is_emoji(self) -> bool
pub fn is_emoji(self) -> bool
Determines whether this Codepoint has the Unicode Emoji property.
The property marks a codepoint that can be presented as emoji; it says nothing about which
presentation is the default. Use Codepoint::has_emoji_presentation for that.
Sourcepub fn has_emoji_presentation(self) -> bool
pub fn has_emoji_presentation(self) -> bool
Determines whether this Codepoint has the Unicode Emoji_Presentation
property, i.e. whether it defaults to an emoji presentation when no variation selector
follows it.
Sourcepub fn is_default_ignorable(self) -> bool
pub fn is_default_ignorable(self) -> bool
Determines whether this Codepoint has the Unicode
Default_Ignorable_Code_Point property.
Default ignorable codepoints (variation selectors, joiners, the byte order mark, …) are meant to have no visible rendering of their own, so a font is not expected to provide a glyph for them.
Sourcepub fn has_script_extension(self, script: Script) -> bool
pub fn has_script_extension(self, script: Script) -> bool
Determines whether the codepoint’s Unicode Script_Extensions property contains
script.
Returns true when the codepoint participates in script per UAX #24
(Script_Extensions); false otherwise.
Backed by the UCD ScriptExtensions.txt data baked into UnicodeData.
Codepoints without an explicit Script_Extensions entry fall back to the singleton set
of their primary Script property.
Sourcepub fn is_east_asian(self) -> bool
pub fn is_east_asian(self) -> bool
Determines whether this Codepoint is an east asian char.
Sourcepub const fn is_break_char(self) -> bool
pub const fn is_break_char(self) -> bool
Determines whether this Codepoint is a break char.
Sourcepub fn is_white_space(self) -> bool
pub fn is_white_space(self) -> bool
Determines whether this Codepoint is white space.
Sourcepub fn try_get_paired_bracket(self) -> Option<Codepoint>
pub fn try_get_paired_bracket(self) -> Option<Codepoint>
Gets the codepoint representing the bracket pairing for this instance,
or None if this instance has no bracket pairing.
Trait Implementations§
impl Copy for Codepoint
impl Eq for Codepoint
impl StructuralPartialEq for Codepoint
Auto Trait Implementations§
impl Freeze for Codepoint
impl RefUnwindSafe for Codepoint
impl Send for Codepoint
impl Sync for Codepoint
impl Unpin for Codepoint
impl UnsafeUnpin for Codepoint
impl UnwindSafe for Codepoint
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more