pub struct WordCounter;Expand description
Simple token counter that splits on whitespace and counts words.
Trait Implementations§
Source§impl Clone for WordCounter
impl Clone for WordCounter
Source§fn clone(&self) -> WordCounter
fn clone(&self) -> WordCounter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WordCounter
impl Debug for WordCounter
Source§impl Default for WordCounter
impl Default for WordCounter
Source§fn default() -> WordCounter
fn default() -> WordCounter
Returns the “default value” for a type. Read more
Source§impl TokenCounter for WordCounter
impl TokenCounter for WordCounter
fn count_tokens(&self, text: &str) -> usize
Auto Trait Implementations§
impl Freeze for WordCounter
impl RefUnwindSafe for WordCounter
impl Send for WordCounter
impl Sync for WordCounter
impl Unpin for WordCounter
impl UnsafeUnpin for WordCounter
impl UnwindSafe for WordCounter
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