pub struct SentenceBreak(/* private fields */);Expand description
Enumerated property Sentence_Break.
See “Default Sentence 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::SentenceBreak, CodePointMapData};
assert_eq!(
    CodePointMapData::<SentenceBreak>::new().get('9'),
    SentenceBreak::Numeric
); // U+FF19: Fullwidth Digit Nine
assert_eq!(
    CodePointMapData::<SentenceBreak>::new().get(','),
    SentenceBreak::SContinue
); // U+002C: CommaImplementations§
Source§impl SentenceBreak
 
impl SentenceBreak
Sourcepub const fn to_icu4c_value(self) -> u8
 
pub const fn to_icu4c_value(self) -> u8
Returns an ICU4C USentenceBreak value.
Sourcepub const fn from_icu4c_value(value: u8) -> SentenceBreak
 
pub const fn from_icu4c_value(value: u8) -> SentenceBreak
Constructor from an ICU4C USentenceBreak value.
Source§impl SentenceBreak
 
impl SentenceBreak
pub const Other: SentenceBreak
pub const ATerm: SentenceBreak
pub const Close: SentenceBreak
pub const Format: SentenceBreak
pub const Lower: SentenceBreak
pub const Numeric: SentenceBreak
pub const OLetter: SentenceBreak
pub const Sep: SentenceBreak
pub const Sp: SentenceBreak
pub const STerm: SentenceBreak
pub const Upper: SentenceBreak
pub const CR: SentenceBreak
pub const Extend: SentenceBreak
pub const LF: SentenceBreak
pub const SContinue: SentenceBreak
Sourcepub const ALL_VALUES: &'static [SentenceBreak]
 
pub const ALL_VALUES: &'static [SentenceBreak]
All possible values of this enum in the Unicode version from this ICU4X release.
Trait Implementations§
Source§impl AsULE for SentenceBreak
 
impl AsULE for SentenceBreak
Source§fn to_unaligned(self) -> <SentenceBreak as AsULE>::ULE
 
fn to_unaligned(self) -> <SentenceBreak as AsULE>::ULE
Source§fn from_unaligned(unaligned: <SentenceBreak as AsULE>::ULE) -> SentenceBreak
 
fn from_unaligned(unaligned: <SentenceBreak as AsULE>::ULE) -> SentenceBreak
Source§impl Clone for SentenceBreak
 
impl Clone for SentenceBreak
Source§fn clone(&self) -> SentenceBreak
 
fn clone(&self) -> SentenceBreak
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for SentenceBreak
 
impl Debug for SentenceBreak
Source§impl<'de> Deserialize<'de> for SentenceBreak
 
impl<'de> Deserialize<'de> for SentenceBreak
Source§fn deserialize<__D>(
    __deserializer: __D,
) -> Result<SentenceBreak, <__D as Deserializer<'de>>::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(
    __deserializer: __D,
) -> Result<SentenceBreak, <__D as Deserializer<'de>>::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EnumeratedProperty for SentenceBreak
 
impl EnumeratedProperty for SentenceBreak
Source§impl Hash for SentenceBreak
 
impl Hash for SentenceBreak
Source§impl NamedEnumeratedProperty for SentenceBreak
 
impl NamedEnumeratedProperty for SentenceBreak
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 SentenceBreak
 
impl Ord for SentenceBreak
Source§fn cmp(&self, other: &SentenceBreak) -> Ordering
 
fn cmp(&self, other: &SentenceBreak) -> Ordering
1.21.0 · 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
Source§impl PartialEq for SentenceBreak
 
impl PartialEq for SentenceBreak
Source§impl PartialOrd for SentenceBreak
 
impl PartialOrd for SentenceBreak
Source§impl Serialize for SentenceBreak
 
impl Serialize for SentenceBreak
Source§fn serialize<__S>(
    &self,
    __serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
    __S: Serializer,
 
fn serialize<__S>(
    &self,
    __serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
    __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TrieValue for SentenceBreak
 
impl TrieValue for SentenceBreak
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<SentenceBreak, <SentenceBreak as TrieValue>::TryFromU32Error>
 
fn try_from_u32( i: u32, ) -> Result<SentenceBreak, <SentenceBreak as TrieValue>::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.impl Copy for SentenceBreak
impl Eq for SentenceBreak
impl ParseableEnumeratedProperty for SentenceBreak
impl StructuralPartialEq for SentenceBreak
Auto Trait Implementations§
impl Freeze for SentenceBreak
impl RefUnwindSafe for SentenceBreak
impl Send for SentenceBreak
impl Sync for SentenceBreak
impl Unpin for SentenceBreak
impl UnwindSafe for SentenceBreak
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more