pub struct CreatedWords(/* private fields */);Expand description
Bitset which represents that a word of a specified length was created. Lattice construction fills this bitmap and passes it to the OOV providers. It allows OOV providers to check if a word of a specific length was created very cheaply.
Unfortunately, if a word is more than MAX_VALUE characters, handlers need to do usual linear-time check.
Implementations§
Source§impl CreatedWords
 
impl CreatedWords
pub fn empty() -> CreatedWords
pub fn single<Pos: Into<i64>>(length: Pos) -> CreatedWords
pub fn add_word<P: Into<i64>>(&self, length: P) -> CreatedWords
pub fn add(&self, other: CreatedWords) -> CreatedWords
pub fn has_word<P: Into<i64> + Copy>(&self, length: P) -> HasWord
pub fn is_empty(&self) -> bool
pub fn not_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for CreatedWords
 
impl Clone for CreatedWords
Source§fn clone(&self) -> CreatedWords
 
fn clone(&self) -> CreatedWords
Returns a copy 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 CreatedWords
 
impl Debug for CreatedWords
Source§impl Default for CreatedWords
 
impl Default for CreatedWords
Source§fn default() -> CreatedWords
 
fn default() -> CreatedWords
Returns the “default value” for a type. Read more
Source§impl PartialEq for CreatedWords
 
impl PartialEq for CreatedWords
impl Copy for CreatedWords
impl Eq for CreatedWords
impl StructuralPartialEq for CreatedWords
Auto Trait Implementations§
impl Freeze for CreatedWords
impl RefUnwindSafe for CreatedWords
impl Send for CreatedWords
impl Sync for CreatedWords
impl Unpin for CreatedWords
impl UnwindSafe for CreatedWords
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,
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more