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
impl<'de> Deserialize<'de> for Standard
[src]
impl<'de> Deserialize<'de> for Standard
[src]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
impl<'h> Hyphenator<'h> for Standard
[src]
impl<'h> Hyphenator<'h> for Standard
[src]type Opportunity = usize
type Opportunity = usize
Plain representation of a word break.
type Exact = usize
type Exact = usize
An owned opportunity used to specify and store the predetermined hyphenation of known words. Read more
fn hyphenate<'t>(&'h self, word: &'t str) -> Word<'t, Self::Opportunity>
[src]
fn hyphenate<'t>(&'h self, word: &'t str) -> Word<'t, Self::Opportunity>
[src]Hyphenate a word, computing appropriate word breaks and preparing it for iteration. Read more
fn opportunities_within(
&'h self,
word: &str,
(l, r): (usize, usize)
) -> Vec<usize>
[src]
fn opportunities_within(
&'h self,
word: &str,
(l, r): (usize, usize)
) -> Vec<usize>
[src]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
fn add_exception(&mut self, w: String, ops: Vec<usize>) -> Option<Vec<usize>>
[src]
fn add_exception(&mut self, w: String, ops: Vec<usize>) -> Option<Vec<usize>>
[src]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
fn remove_exception(&mut self, w: &str) -> Option<Vec<usize>>
[src]
fn remove_exception(&mut self, w: &str) -> Option<Vec<usize>>
[src]If the word is an exception, remove it and return the previously specified opportunities; otherwise, return none. Read more
fn unbreakable_chars(&self) -> (usize, usize)
[src]
fn unbreakable_chars(&self) -> (usize, usize)
[src]The number of char
s from the start and end of a word where breaks may
not occur, according to dictionary parameters. Read more
fn opportunities(&'h self, lowercase_word: &str) -> Vec<Self::Opportunity>
[src]
fn opportunities(&'h self, lowercase_word: &str) -> Vec<Self::Opportunity>
[src]The hyphenation opportunities that our dictionary can find in the given word. The word should be lowercase. Read more
impl Load for Standard
[src]
impl Load for Standard
[src]fn from_reader<R>(lang: Language, reader: &mut R) -> Result<Self> where
R: Read,
[src]
fn from_reader<R>(lang: Language, reader: &mut R) -> Result<Self> where
R: Read,
[src]Deserialize a dictionary from the provided reader, verifying that it belongs to the expected language. Read more
fn any_from_reader<R>(reader: &mut R) -> Result<Self> where
R: Read,
[src]
fn any_from_reader<R>(reader: &mut R) -> Result<Self> where
R: Read,
[src]Deserialize a dictionary from the provided reader.
impl<'d> Score<'d> for Standard
[src]
impl<'d> Score<'d> for Standard
[src]impl Serialize for Standard
[src]
impl Serialize for Standard
[src]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 Send for Standard
impl Sync for Standard
impl Unpin for Standard
impl UnwindSafe for Standard
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,