#[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
impl Copy for LineBreakStrictness
impl Eq for LineBreakStrictness
impl StructuralPartialEq for LineBreakStrictness
Auto Trait Implementations§
impl Freeze for LineBreakStrictness
impl RefUnwindSafe for LineBreakStrictness
impl Send for LineBreakStrictness
impl Sync for LineBreakStrictness
impl Unpin for LineBreakStrictness
impl UnwindSafe for LineBreakStrictness
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more