Struct hyphenation::Standard [−][src]
pub struct Standard { pub exceptions: Exceptions, pub minima: (usize, usize), // some fields omitted }
Expand description
A dictionary for standard Knuth–Liang hyphenation.
It comprises the working language, the pattern and exception sets, and the character boundaries for hyphenation.
Fields
exceptions: Exceptions
minima: (usize, usize)
The minimum number of char
s from the start and end of a word where
breaks may not occur.
Implementations
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Standard, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Standard, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
type Opportunity = usize
type Opportunity = usize
Plain representation of a word break.
An owned opportunity used to specify and store the predetermined hyphenation of known words. Read more
Hyphenate a word, computing appropriate word breaks and preparing it for iteration. Read more
The hyphenation opportunities that arise by pattern between the specified byte indices. Read more
fn exception_within(
&'h self,
w: &str,
(l, r): (usize, usize)
) -> Option<Vec<Self::Opportunity>>
[src]
fn exception_within(
&'h self,
w: &str,
(l, r): (usize, usize)
) -> Option<Vec<Self::Opportunity>>
[src]The hyphenation opportunities that arise by exception between the specified byte indices, if any. Read more
Specify the hyphenation of the given word with an exact sequence of
opportunities and add it to the exception list. Subsequent calls to
hyphenate
or opportunities
will yield this hyphenation instead of
generating one from patterns. Read more
If the word is an exception, remove it and return the previously specified opportunities; otherwise, return none. Read more
The number of char
s from the start and end of a word where breaks may
not occur, according to dictionary parameters. Read more
The hyphenation opportunities that our dictionary can find in the given word. The word should be lowercase. Read more
If this word is a known exception, retrieve its specified hyphenation.
Deserialize a dictionary from the provided reader, verifying that it belongs to the expected language. Read more
Deserialize a dictionary from the provided reader.
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. Read more
Whether the given value denotes a valid break.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Standard
impl UnwindSafe for Standard
Blanket Implementations
Mutably borrows from an owned value. Read more