#[non_exhaustive]
pub enum LineBreakWordOption {
Normal,
BreakAll,
KeepAll,
}
Expand description
An enum specifies the line break opportunities between letters. It can be passed as an argument when creating a line segmenter.
Each enum value has the same meaning with respect to the word-break
property values in the CSS Text spec. See the details in
https://drafts.csswg.org/css-text-3/#word-break-property
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Normal
Words break according to their customary rules. See the details in https://drafts.csswg.org/css-text-3/#valdef-word-break-normal.
BreakAll
Breaking is allowed within “words”. https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all
KeepAll
Breaking is forbidden within “word”. https://drafts.csswg.org/css-text-3/#valdef-word-break-keep-all
Trait Implementations§
source§impl Clone for LineBreakWordOption
impl Clone for LineBreakWordOption
source§fn clone(&self) -> LineBreakWordOption
fn clone(&self) -> LineBreakWordOption
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 LineBreakWordOption
impl Debug for LineBreakWordOption
source§impl PartialEq<LineBreakWordOption> for LineBreakWordOption
impl PartialEq<LineBreakWordOption> for LineBreakWordOption
source§fn eq(&self, other: &LineBreakWordOption) -> bool
fn eq(&self, other: &LineBreakWordOption) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.