Enum unicode_linebreak::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 copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for BreakClass

source§

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

Formats the value using the given formatter. Read more
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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for BreakClass

source§

impl Eq for BreakClass

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§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

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

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

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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>,

§

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>,

§

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.