Struct hyphenation::Exceptions
[−]
[src]
pub struct Exceptions(pub HashMap<String, Vec<usize>, RandomState>);
A specialized hash map of pattern-score pairs.
Trait Implementations
impl Deserialize for Exceptions
[src]
fn deserialize<__D>(
deserializer: &mut __D
) -> Result<Exceptions, <__D as Deserializer>::Error> where
__D: Deserializer,
deserializer: &mut __D
) -> Result<Exceptions, <__D as Deserializer>::Error> where
__D: Deserializer,
impl Serialize for Exceptions
[src]
fn serialize<__S>(
&self,
_serializer: &mut __S
) -> Result<(), <__S as Serializer>::Error> where
__S: Serializer,
&self,
_serializer: &mut __S
) -> Result<(), <__S as Serializer>::Error> where
__S: Serializer,
impl<'a> KLPTrie<'a> for Exceptions
[src]
type Score = Option<&'a Vec<usize>>
type Tally = Vec<usize>
fn new() -> Exceptions
Creates an empty Exceptions
map.
fn insert(
&mut self,
(String, <Exceptions as KLPTrie<'a>>::Tally)
) -> Option<<Exceptions as KLPTrie<'a>>::Tally>
&mut self,
(String, <Exceptions as KLPTrie<'a>>::Tally)
) -> Option<<Exceptions as KLPTrie<'a>>::Tally>
Inserts a Knuth-Liang exception pair into the map.
If the pattern already exists, the old score is returned; if not, None
is.
fn score(&'a self, word: &str) -> <Exceptions as KLPTrie<'a>>::Score
Retrieves the score for each hyphenation point of word
.
fn is_empty(&self) -> bool
impl Debug for Exceptions
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl Clone for Exceptions
[src]
fn clone(&self) -> Exceptions
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more