Skip to main content

BreakClass

Enum BreakClass 

Source
#[repr(u8)]
pub enum BreakClass {
Show 43 variants Mandatory = 0, CarriageReturn = 1, LineFeed = 2, CombiningMark = 3, NextLine = 4, Surrogate = 5, WordJoiner = 6, ZeroWidthSpace = 7, NonBreakingGlue = 8, Space = 9, ZeroWidthJoiner = 10, BeforeAndAfter = 11, After = 12, Before = 13, Hyphen = 14, Contingent = 15, ClosePunctuation = 16, CloseParenthesis = 17, Exclamation = 18, Inseparable = 19, NonStarter = 20, OpenPunctuation = 21, Quotation = 22, InfixSeparator = 23, Numeric = 24, Postfix = 25, Prefix = 26, Symbol = 27, Ambiguous = 28, Alphabetic = 29, ConditionalJapaneseStarter = 30, EmojiBase = 31, EmojiModifier = 32, HangulLvSyllable = 33, HangulLvtSyllable = 34, HebrewLetter = 35, Ideographic = 36, HangulLJamo = 37, HangulVJamo = 38, HangulTJamo = 39, RegionalIndicator = 40, ComplexContext = 41, Unknown = 42,
}
Expand description

Unicode line breaking class.

Variants§

§

Mandatory = 0

Cause a line break (after)

§

CarriageReturn = 1

Cause a line break (after), except between CR and LF

§

LineFeed = 2

Cause a line break (after)

§

CombiningMark = 3

Prohibit a line break between the character and the preceding character

§

NextLine = 4

Cause a line break (after)

§

Surrogate = 5

Do not occur in well-formed text

§

WordJoiner = 6

Prohibit line breaks before and after

§

ZeroWidthSpace = 7

Provide a break opportunity

§

NonBreakingGlue = 8

Prohibit line breaks before and after

§

Space = 9

Enable indirect line breaks

§

ZeroWidthJoiner = 10

Prohibit line breaks within joiner sequences

§

BeforeAndAfter = 11

Provide a line break opportunity before and after the character

§

After = 12

Generally provide a line break opportunity after the character

§

Before = 13

Generally provide a line break opportunity before the character

§

Hyphen = 14

Provide a line break opportunity after the character, except in numeric context

§

Contingent = 15

Provide a line break opportunity contingent on additional information

§

ClosePunctuation = 16

Prohibit line breaks before

§

CloseParenthesis = 17

Prohibit line breaks before

§

Exclamation = 18

Prohibit line breaks before

§

Inseparable = 19

Allow only indirect line breaks between pairs

§

NonStarter = 20

Allow only indirect line breaks before

§

OpenPunctuation = 21

Prohibit line breaks after

§

Quotation = 22

Act like they are both opening and closing

§

InfixSeparator = 23

Prevent breaks after any and before numeric

§

Numeric = 24

Form numeric expressions for line breaking purposes

§

Postfix = 25

Do not break following a numeric expression

§

Prefix = 26

Do not break in front of a numeric expression

§

Symbol = 27

Prevent a break before, and allow a break after

§

Ambiguous = 28

Act like AL when the resolved EAW is N; otherwise, act as ID

§

Alphabetic = 29

Are alphabetic characters or symbols that are used with alphabetic characters

§

ConditionalJapaneseStarter = 30

Treat as NS or ID for strict or normal breaking.

§

EmojiBase = 31

Do not break from following Emoji Modifier

§

EmojiModifier = 32

Do not break from preceding Emoji Base

§

HangulLvSyllable = 33

Form Korean syllable blocks

§

HangulLvtSyllable = 34

Form Korean syllable blocks

§

HebrewLetter = 35

Do not break around a following hyphen; otherwise act as Alphabetic

§

Ideographic = 36

Break before or after, except in some numeric context

§

HangulLJamo = 37

Form Korean syllable blocks

§

HangulVJamo = 38

Form Korean syllable blocks

§

HangulTJamo = 39

Form Korean syllable blocks

§

RegionalIndicator = 40

Keep pairs together. For pairs, break before and after other classes

§

ComplexContext = 41

Provide a line break opportunity contingent on additional, language-specific context analysis

§

Unknown = 42

Have as yet unknown line breaking behavior or unassigned code positions

Trait Implementations§

Source§

impl Clone for BreakClass

Source§

fn clone(&self) -> BreakClass

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BreakClass

Source§

impl Debug for BreakClass

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for BreakClass

Source§

impl Hash for BreakClass

Source§

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

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for BreakClass

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BreakClass

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.