pub struct WordCounter;
Expand description
A marker struct for counting words in code chunks.
use code_splitter::{Splitter, WordCounter};
let lang = tree_sitter_md::language();
let splitter = Splitter::new(lang, WordCounter).unwrap();
let code = b"hello, world!";
let chunks = splitter.split(code).unwrap();
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WordCounter
impl RefUnwindSafe for WordCounter
impl Send for WordCounter
impl Sync for WordCounter
impl Unpin 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