pub struct GraphemeClusterBreak(/* private fields */);Expand description
Enumerated property Grapheme_Cluster_Break.
See “Default Grapheme Cluster Boundary Specification” in UAX #29 for the summary of each property value: https://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table
Note: Use icu::segmenter for an all-in-one break iterator implementation.
§Example
use icu::properties::{CodePointMapData, props::GraphemeClusterBreak};
assert_eq!(
CodePointMapData::<GraphemeClusterBreak>::new().get('🇦'),
GraphemeClusterBreak::RegionalIndicator
); // U+1F1E6: Regional Indicator Symbol Letter A
assert_eq!(
CodePointMapData::<GraphemeClusterBreak>::new().get('ำ'),
GraphemeClusterBreak::SpacingMark
); //U+0E33: Thai Character Sara AmImplementations§
Source§impl GraphemeClusterBreak
impl GraphemeClusterBreak
pub const Other: Self
pub const XX: Self = Self::Other
pub const Control: Self
pub const CN: Self = Self::Control
pub const CR: Self
pub const Extend: Self
pub const EX: Self = Self::Extend
pub const L: Self
pub const LF: Self
pub const LV: Self
pub const LVT: Self
pub const T: Self
pub const V: Self
pub const SpacingMark: Self
pub const SM: Self = Self::SpacingMark
pub const Prepend: Self
pub const PP: Self = Self::Prepend
pub const RegionalIndicator: Self
pub const RI: Self = Self::RegionalIndicator
pub const EBase: Self
pub const EB: Self = Self::EBase
pub const EBaseGAZ: Self
pub const EBG: Self = Self::EBaseGAZ
pub const EModifier: Self
pub const EM: Self = Self::EModifier
pub const GlueAfterZwj: Self
pub const GAZ: Self = Self::GlueAfterZwj
pub const ZWJ: Self
Source§impl GraphemeClusterBreak
impl GraphemeClusterBreak
Sourcepub const ALL_VALUES: &'static [Self]
👎Deprecated
pub const ALL_VALUES: &'static [Self]
Deprecated
Source§impl GraphemeClusterBreak
impl GraphemeClusterBreak
Sourcepub const fn to_icu4c_value(self) -> u8
👎Deprecated since 2.3.0: please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this
pub const fn to_icu4c_value(self) -> u8
please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this
Returns an ICU4C UGraphemeClusterBreak value.
Sourcepub const fn from_icu4c_value(value: u8) -> Self
👎Deprecated since 2.3.0: please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this
pub const fn from_icu4c_value(value: u8) -> Self
please comment on https://github.com/unicode-org/icu4x/issues/6067 if you need this
Constructor from an ICU4C UGraphemeClusterBreak value.
Trait Implementations§
Source§impl AsULE for GraphemeClusterBreak
impl AsULE for GraphemeClusterBreak
Source§impl Clone for GraphemeClusterBreak
impl Clone for GraphemeClusterBreak
Source§fn clone(&self) -> GraphemeClusterBreak
fn clone(&self) -> GraphemeClusterBreak
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GraphemeClusterBreak
Source§impl Debug for GraphemeClusterBreak
impl Debug for GraphemeClusterBreak
Source§impl Default for GraphemeClusterBreak
impl Default for GraphemeClusterBreak
impl Eq for GraphemeClusterBreak
Source§impl From<GraphemeClusterBreak> for u16
impl From<GraphemeClusterBreak> for u16
Source§fn from(other: GraphemeClusterBreak) -> Self
fn from(other: GraphemeClusterBreak) -> Self
Converts to this type from the input type.
Source§impl Hash for GraphemeClusterBreak
impl Hash for GraphemeClusterBreak
Source§impl NamedEnumeratedProperty for GraphemeClusterBreak
impl NamedEnumeratedProperty for GraphemeClusterBreak
Source§fn try_from_str(s: &str) -> Option<Self>
fn try_from_str(s: &str) -> Option<Self>
Convenience method for
PropertyParser::new().get_loose(s) Read moreSource§fn long_name(&self) -> &'static str
fn long_name(&self) -> &'static str
Convenience method for
PropertyNamesLong::new().get(*self).unwrap() Read moreSource§fn short_name(&self) -> &'static str
fn short_name(&self) -> &'static str
Convenience method for
PropertyNamesShort::new().get(*self).unwrap() Read moreSource§impl Ord for GraphemeClusterBreak
impl Ord for GraphemeClusterBreak
Source§fn cmp(&self, other: &GraphemeClusterBreak) -> Ordering
fn cmp(&self, other: &GraphemeClusterBreak) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
impl ParseableEnumeratedProperty for GraphemeClusterBreak
Source§impl PartialEq for GraphemeClusterBreak
impl PartialEq for GraphemeClusterBreak
Source§impl PartialOrd for GraphemeClusterBreak
impl PartialOrd for GraphemeClusterBreak
impl StructuralPartialEq for GraphemeClusterBreak
Source§impl TrieValue for GraphemeClusterBreak
impl TrieValue for GraphemeClusterBreak
Source§type TryFromU32Error = TryFromIntError
type TryFromU32Error = TryFromIntError
Last-resort fallback value to return if we cannot read data from the trie. Read more
Source§fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>
fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>
A parsing function that is primarily motivated by deserialization contexts.
When the serialization type width is smaller than 32 bits, then it is expected
that the call site will widen the value to a
u32 first.Auto Trait Implementations§
impl Freeze for GraphemeClusterBreak
impl RefUnwindSafe for GraphemeClusterBreak
impl Send for GraphemeClusterBreak
impl Sync for GraphemeClusterBreak
impl Unpin for GraphemeClusterBreak
impl UnsafeUnpin for GraphemeClusterBreak
impl UnwindSafe for GraphemeClusterBreak
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