pub struct GraphemeProps { /* private fields */ }grapheme only.Expand description
๐ Combined EGC break properties for a single code point.
๐ text/unicode/grapheme::GraphemeProps
๐ฆ size_of::<GraphemeProps>() == 1 bytes / 8 bits
โ๏ธOption<T> โ๐ฐ T
Packed representation of both GraphemePropCb and GraphemePropInCb
properties used by Unicode grapheme cluster boundary rules.
ยงVendored
This is adapted work from grapheme_machine.
Implementationsยง
Sourceยงimpl GraphemeProps
impl GraphemeProps
Sourcepub const fn new(gcb: GraphemePropCb, incb: GraphemePropInCb) -> Self
pub const fn new(gcb: GraphemePropCb, incb: GraphemePropInCb) -> Self
Creates a new property tuple from individual break properties.
Sourcepub const fn for_charu(c: charu) -> Self
pub const fn for_charu(c: charu) -> Self
Looks up grapheme properties for a scalar.
Uses an embedded trie to find the Grapheme_Cluster_Break and Indic_Conjunct_Break properties for the scalar.
Sourcepub const fn for_char(c: char) -> Self
pub const fn for_char(c: char) -> Self
Looks up grapheme properties for a scalar.
Convenience method that converts to charu internally.
Prefer for_charu if you already have a charu.
Sourcepub const fn gcb_property(self) -> GraphemePropCb
pub const fn gcb_property(self) -> GraphemePropCb
Returns the Grapheme_Cluster_Break property.
ยงFeatures
Uses the unsafe_layout feature to transmute instead of match.
Sourcepub const fn incb_property(self) -> GraphemePropInCb
pub const fn incb_property(self) -> GraphemePropInCb
Returns the Indic_Conjunct_Break property.
ยงFeatures
Uses the unsafe_layout feature to transmute instead of match.
Sourcepub const fn is_any_control(self) -> bool
pub const fn is_any_control(self) -> bool
Trait Implementationsยง
Sourceยงimpl Clone for GraphemeProps
impl Clone for GraphemeProps
Sourceยงfn clone(&self) -> GraphemeProps
fn clone(&self) -> GraphemeProps
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GraphemeProps
Sourceยงimpl Debug for GraphemeProps
impl Debug for GraphemeProps
impl Eq for GraphemeProps
Sourceยงimpl Hash for GraphemeProps
impl Hash for GraphemeProps
Auto Trait Implementationsยง
impl Freeze for GraphemeProps
impl RefUnwindSafe for GraphemeProps
impl Send for GraphemeProps
impl Sync for GraphemeProps
impl Unpin for GraphemeProps
impl UnsafeUnpin for GraphemeProps
impl UnwindSafe for GraphemeProps
Blanket Implementationsยง
Sourceยงimpl<T> AnyExt for T
impl<T> AnyExt for T
Sourceยงfn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
TypeId of Self using a custom hasher.Sourceยงfn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Sourceยงfn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
fn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
alloc only.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> ByteSized for T
impl<T> ByteSized for T
Sourceยงconst BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Sourceยงfn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Sourceยงfn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<T> MemExt for Twhere
T: ?Sized,
impl<T> MemExt for Twhere
T: ?Sized,
Sourceยงconst NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Sourceยงfn mem_align_of<T>() -> usize
fn mem_align_of<T>() -> usize
Sourceยงfn mem_align_of_val(&self) -> usize
fn mem_align_of_val(&self) -> usize
Sourceยงfn mem_size_of<T>() -> usize
fn mem_size_of<T>() -> usize
Sourceยงfn mem_size_of_val(&self) -> usize
fn mem_size_of_val(&self) -> usize
Sourceยงfn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true if dropping values of this type matters. Read moreSourceยงfn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self without running its destructor. Read moreSourceยงfn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Sourceยงunsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงunsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงfn mem_as_bytes(&self) -> &[u8] โ
fn mem_as_bytes(&self) -> &[u8] โ
unsafe_slice only.