#[repr(transparent)]pub struct LineBreak(pub u8);Expand description
Enumerated property Line_Break.
See “Line Breaking Properties” in UAX #14 for the summary of each property value: https://www.unicode.org/reports/tr14/#Properties
The numeric value is compatible with ULineBreak in ICU4C.
Tuple Fields§
§0: u8Implementations§
Source§impl LineBreak
impl LineBreak
pub const Unknown: LineBreak
pub const Ambiguous: LineBreak
pub const Alphabetic: LineBreak
pub const BreakBoth: LineBreak
pub const BreakAfter: LineBreak
pub const BreakBefore: LineBreak
pub const MandatoryBreak: LineBreak
pub const ContingentBreak: LineBreak
pub const ClosePunctuation: LineBreak
pub const CombiningMark: LineBreak
pub const CarriageReturn: LineBreak
pub const Exclamation: LineBreak
pub const Glue: LineBreak
pub const Hyphen: LineBreak
pub const Ideographic: LineBreak
pub const Inseparable: LineBreak
pub const InfixNumeric: LineBreak
pub const LineFeed: LineBreak
pub const Nonstarter: LineBreak
pub const Numeric: LineBreak
pub const OpenPunctuation: LineBreak
pub const PostfixNumeric: LineBreak
pub const PrefixNumeric: LineBreak
pub const Quotation: LineBreak
pub const ComplexContext: LineBreak
pub const Surrogate: LineBreak
pub const Space: LineBreak
pub const BreakSymbols: LineBreak
pub const ZWSpace: LineBreak
pub const NextLine: LineBreak
pub const WordJoiner: LineBreak
pub const H2: LineBreak
pub const H3: LineBreak
pub const JL: LineBreak
pub const JT: LineBreak
pub const JV: LineBreak
pub const CloseParenthesis: LineBreak
pub const ConditionalJapaneseStarter: LineBreak
pub const HebrewLetter: LineBreak
pub const RegionalIndicator: LineBreak
pub const EBase: LineBreak
pub const EModifier: LineBreak
pub const ZWJ: LineBreak
pub const Aksara: LineBreak
pub const AksaraPrebase: LineBreak
pub const AksaraStart: LineBreak
pub const ViramaFinal: LineBreak
pub const Virama: LineBreak
Source§impl LineBreak
impl LineBreak
Sourcepub const fn name_to_enum_mapper() -> PropertyValueNameToEnumMapperBorrowed<'static, LineBreak>
pub const fn name_to_enum_mapper() -> PropertyValueNameToEnumMapperBorrowed<'static, LineBreak>
Return a PropertyValueNameToEnumMapper, capable of looking up values
from strings for the Line_Break enumerated property.
✨ Enabled with the compiled_data Cargo feature.
§Example
use icu::properties::LineBreak;
let lookup = LineBreak::name_to_enum_mapper();
// short name for value
assert_eq!(lookup.get_strict("BK"), Some(LineBreak::MandatoryBreak));
assert_eq!(lookup.get_strict("AL"), Some(LineBreak::Alphabetic));
// long name for value
assert_eq!(lookup.get_strict("Mandatory_Break"), Some(LineBreak::MandatoryBreak));
assert_eq!(lookup.get_strict("Alphabetic"), Some(LineBreak::Alphabetic));
// name has incorrect casing and dash instead of underscore
assert_eq!(lookup.get_strict("mandatory-Break"), None);
// loose matching of name
assert_eq!(lookup.get_loose("mandatory-Break"), Some(LineBreak::MandatoryBreak));
// fake property
assert_eq!(lookup.get_strict("Stochastic_Break"), None);Sourcepub fn get_name_to_enum_mapper(
provider: &(impl DataProvider<LineBreakNameToValueV1Marker> + ?Sized),
) -> Result<PropertyValueNameToEnumMapper<LineBreak>, PropertiesError>
pub fn get_name_to_enum_mapper( provider: &(impl DataProvider<LineBreakNameToValueV1Marker> + ?Sized), ) -> Result<PropertyValueNameToEnumMapper<LineBreak>, PropertiesError>
A version of LineBreak::name_to_enum_mapper() that uses custom data provided by a DataProvider.
Sourcepub const fn enum_to_short_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, LineBreak>
pub const fn enum_to_short_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, LineBreak>
Return a PropertyEnumToValueNameLinearMapper, capable of looking up short names
for values of the Line_Break enumerated property.
✨ Enabled with the compiled_data Cargo feature.
§Example
use icu::properties::LineBreak;
let lookup = LineBreak::enum_to_short_name_mapper();
assert_eq!(lookup.get(LineBreak::MandatoryBreak), Some("BK"));
assert_eq!(lookup.get(LineBreak::Alphabetic), Some("AL"));Sourcepub fn get_enum_to_short_name_mapper(
provider: &(impl DataProvider<LineBreakValueToShortNameV1Marker> + ?Sized),
) -> Result<PropertyEnumToValueNameLinearMapper<LineBreak>, PropertiesError>
pub fn get_enum_to_short_name_mapper( provider: &(impl DataProvider<LineBreakValueToShortNameV1Marker> + ?Sized), ) -> Result<PropertyEnumToValueNameLinearMapper<LineBreak>, PropertiesError>
A version of LineBreak::enum_to_short_name_mapper() that uses custom data provided by a DataProvider.
Sourcepub const fn enum_to_long_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, LineBreak>
pub const fn enum_to_long_name_mapper() -> PropertyEnumToValueNameLinearMapperBorrowed<'static, LineBreak>
Return a PropertyEnumToValueNameLinearMapper, capable of looking up long names
for values of the Line_Break enumerated property.
✨ Enabled with the compiled_data Cargo feature.
§Example
use icu::properties::LineBreak;
let lookup = LineBreak::enum_to_long_name_mapper();
assert_eq!(lookup.get(LineBreak::MandatoryBreak), Some("Mandatory_Break"));
assert_eq!(lookup.get(LineBreak::Alphabetic), Some("Alphabetic"));Sourcepub fn get_enum_to_long_name_mapper(
provider: &(impl DataProvider<LineBreakValueToLongNameV1Marker> + ?Sized),
) -> Result<PropertyEnumToValueNameLinearMapper<LineBreak>, PropertiesError>
pub fn get_enum_to_long_name_mapper( provider: &(impl DataProvider<LineBreakValueToLongNameV1Marker> + ?Sized), ) -> Result<PropertyEnumToValueNameLinearMapper<LineBreak>, PropertiesError>
A version of LineBreak::enum_to_long_name_mapper() that uses custom data provided by a DataProvider.
Trait Implementations§
Source§impl Ord for LineBreak
impl Ord for LineBreak
Source§impl PartialOrd for LineBreak
impl PartialOrd for LineBreak
Source§impl TrieValue for LineBreak
impl TrieValue for LineBreak
Source§type TryFromU32Error = TryFromIntError
type TryFromU32Error = TryFromIntError
Source§fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>
fn try_from_u32(i: u32) -> Result<Self, Self::TryFromU32Error>
u32 first.Source§impl<'a> ZeroMapKV<'a> for LineBreak
impl<'a> ZeroMapKV<'a> for LineBreak
impl Copy for LineBreak
impl Eq for LineBreak
impl StructuralPartialEq for LineBreak
Auto Trait Implementations§
impl Freeze for LineBreak
impl RefUnwindSafe for LineBreak
impl Send for LineBreak
impl Sync for LineBreak
impl Unpin for LineBreak
impl UnwindSafe for LineBreak
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte