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::{CodePointMapData, props::SentenceBreak};
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
pub const Other: Self
pub const XX: Self = Self::Other
pub const ATerm: Self
pub const AT: Self = Self::ATerm
pub const Close: Self
pub const CL: Self = Self::Close
pub const Format: Self
pub const FO: Self = Self::Format
pub const Lower: Self
pub const LO: Self = Self::Lower
pub const Numeric: Self
pub const NU: Self = Self::Numeric
pub const OLetter: Self
pub const LE: Self = Self::OLetter
pub const Sep: Self
pub const SE: Self = Self::Sep
pub const Sp: Self
pub const SP: Self = Self::Sp
pub const STerm: Self
pub const ST: Self = Self::STerm
pub const Upper: Self
pub const UP: Self = Self::Upper
pub const CR: Self
pub const Extend: Self
pub const EX: Self = Self::Extend
pub const LF: Self
pub const SContinue: Self
pub const SC: Self = Self::SContinue
Source§impl SentenceBreak
impl SentenceBreak
Sourcepub const ALL_VALUES: &'static [Self]
👎Deprecated
pub const ALL_VALUES: &'static [Self]
Deprecated
Source§impl SentenceBreak
impl SentenceBreak
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 USentenceBreak 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 USentenceBreak value.
Trait Implementations§
Source§impl AsULE for SentenceBreak
impl AsULE for SentenceBreak
Source§impl Clone for SentenceBreak
impl Clone for SentenceBreak
Source§fn clone(&self) -> SentenceBreak
fn clone(&self) -> SentenceBreak
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 SentenceBreak
Source§impl Debug for SentenceBreak
impl Debug for SentenceBreak
Source§impl Default for SentenceBreak
impl Default for SentenceBreak
Source§impl EnumeratedProperty for SentenceBreak
impl EnumeratedProperty for SentenceBreak
impl Eq for SentenceBreak
Source§impl From<SentenceBreak> for u16
impl From<SentenceBreak> for u16
Source§fn from(other: SentenceBreak) -> Self
fn from(other: SentenceBreak) -> Self
Converts to this type from the input type.
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 (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 SentenceBreak
Source§impl PartialEq for SentenceBreak
impl PartialEq for SentenceBreak
Source§impl PartialOrd for SentenceBreak
impl PartialOrd for SentenceBreak
impl StructuralPartialEq for SentenceBreak
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<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 SentenceBreak
impl RefUnwindSafe for SentenceBreak
impl Send for SentenceBreak
impl Sync for SentenceBreak
impl Unpin for SentenceBreak
impl UnsafeUnpin 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