Struct WordBreak

struct WordBreak(_)

Enumerated property Word_Break.

See "Default Word Boundary Specification" in UAX #29 for the summary of each property value: https://www.unicode.org/reports/tr29/#Default_Word_Boundaries.

Note: Use icu::segmenter for an all-in-one break iterator implementation.

Example

use icu::properties::{props::WordBreak, CodePointMapData};

assert_eq!(
    CodePointMapData::<WordBreak>::new().get('.'),
    WordBreak::MidNumLet
); // U+002E: Full Stop
assert_eq!(
    CodePointMapData::<WordBreak>::new().get(''),
    WordBreak::MidNum
); // U+FF0C: Fullwidth Comma

Implementations

impl WordBreak

const fn to_icu4c_value(self: Self) -> u8

Returns an ICU4C UWordBreak value.

const fn from_icu4c_value(value: u8) -> Self

Constructor from an ICU4C UWordBreak value.

impl WordBreak

impl AsULE for WordBreak

fn to_unaligned(self: Self) -> <Self as >::ULE
fn from_unaligned(unaligned: <Self as >::ULE) -> Self

impl Clone for WordBreak

fn clone(self: &Self) -> WordBreak

impl Copy for WordBreak

impl Debug for WordBreak

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl EnumeratedProperty for WordBreak

impl Eq for WordBreak

impl Freeze for WordBreak

impl Hash for WordBreak

fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)

impl NamedEnumeratedProperty for WordBreak

impl Ord for WordBreak

fn cmp(self: &Self, other: &WordBreak) -> Ordering

impl ParseableEnumeratedProperty for WordBreak

impl PartialEq for WordBreak

fn eq(self: &Self, other: &WordBreak) -> bool

impl PartialOrd for WordBreak

fn partial_cmp(self: &Self, other: &WordBreak) -> Option<Ordering>

impl RefUnwindSafe for WordBreak

impl Send for WordBreak

impl StructuralPartialEq for WordBreak

impl Sync for WordBreak

impl TrieValue for WordBreak

fn try_from_u32(i: u32) -> Result<Self, <Self as >::TryFromU32Error>
fn to_u32(self: Self) -> u32

impl Unpin for WordBreak

impl UnsafeUnpin for WordBreak

impl UnwindSafe for WordBreak

impl<T> Any for WordBreak

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for WordBreak

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for WordBreak

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for WordBreak

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> ErasedDestructor for WordBreak

impl<T> From for WordBreak

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for WordBreak

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for WordBreak

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for WordBreak

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for WordBreak

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>