[−][src]Trait spandex_hyphenation::score::Score
Methods to evaluate each index in a string as an opportunity for hyphenation.
Associated Types
type Value
A value assigned to each index — which is to say, to each potential break between letters — to determine whether the string can be broken at that index.
Required methods
fn score(&'d self, word: &str) -> Vec<Self::Value>
Generate a word's hyphenation score, from which opportunities may be extracted.
The Standard
and Extended
dictionaries mark each byte index with
an integer value, where an odd value marks the index as a valid break.
fn denotes_opportunity(value: Self::Value) -> bool
Whether the given value denotes a valid break.