Enum icu_segmenter::line::LineBreakStrictness
source · #[non_exhaustive]pub enum LineBreakStrictness {
Loose,
Normal,
Strict,
Anywhere,
}
Expand description
An enum specifies the strictness of line-breaking rules. It can be passed as an argument when creating a line segmenter.
Each enum value has the same meaning with respect to the line-break
property values in the CSS Text spec. See the details in
https://drafts.csswg.org/css-text-3/#line-break-property.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Loose
Breaks text using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers. https://drafts.csswg.org/css-text-3/#valdef-line-break-loose
Normal
Breaks text using the most common set of line-breaking rules. https://drafts.csswg.org/css-text-3/#valdef-line-break-normal
Strict
Breaks text using the most stringent set of line-breaking rules. https://drafts.csswg.org/css-text-3/#valdef-line-break-strict
This is the default behaviour of the Unicode Line Breaking Algorithm, resolving class CJ to NS; see rule LB1.
Anywhere
Breaks text assuming there is a soft wrap opportunity around every typographic character unit, disregarding any prohibition against line breaks. See more details in https://drafts.csswg.org/css-text-3/#valdef-line-break-anywhere.
Trait Implementations§
source§impl Clone for LineBreakStrictness
impl Clone for LineBreakStrictness
source§fn clone(&self) -> LineBreakStrictness
fn clone(&self) -> LineBreakStrictness
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LineBreakStrictness
impl Debug for LineBreakStrictness
source§impl PartialEq for LineBreakStrictness
impl PartialEq for LineBreakStrictness
source§fn eq(&self, other: &LineBreakStrictness) -> bool
fn eq(&self, other: &LineBreakStrictness) -> bool
self
and other
values to be equal, and is used
by ==
.