pub struct HyphenBreakPoint {
pub offset: usize,
pub level: u8,
}Expand description
A valid hyphenation break point within a word.
Fields§
§offset: usizeGrapheme offset within the word after which a hyphen can be inserted.
For a word “example” with a break after “ex”, offset = 2.
level: u8The pattern level that determined this break (always odd).
Implementations§
Source§impl HyphenBreakPoint
impl HyphenBreakPoint
Sourcepub fn to_penalty(self) -> BreakPenalty
pub fn to_penalty(self) -> BreakPenalty
Convert to a BreakPenalty for the paragraph objective.
Higher-confidence breaks (higher odd level) get lower penalties. Level 1 = standard penalty (50), level 3 = reduced (40), level 5+ = low (30).
Trait Implementations§
Source§impl Clone for HyphenBreakPoint
impl Clone for HyphenBreakPoint
Source§fn clone(&self) -> HyphenBreakPoint
fn clone(&self) -> HyphenBreakPoint
Returns a duplicate 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 HyphenBreakPoint
impl Debug for HyphenBreakPoint
Source§impl PartialEq for HyphenBreakPoint
impl PartialEq for HyphenBreakPoint
impl Copy for HyphenBreakPoint
impl Eq for HyphenBreakPoint
impl StructuralPartialEq for HyphenBreakPoint
Auto Trait Implementations§
impl Freeze for HyphenBreakPoint
impl RefUnwindSafe for HyphenBreakPoint
impl Send for HyphenBreakPoint
impl Sync for HyphenBreakPoint
impl Unpin for HyphenBreakPoint
impl UnsafeUnpin for HyphenBreakPoint
impl UnwindSafe for HyphenBreakPoint
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.