Struct text_splitter::Characters
source · pub struct Characters;Expand description
Used for splitting a piece of text into chunks based on the number of characters in each chunk.
use text_splitter::{Characters, TextSplitter};
let splitter = TextSplitter::new(Characters);Trait Implementations§
source§impl ChunkSizer for Characters
impl ChunkSizer for Characters
source§fn chunk_size(&self, chunk: &str, capacity: &impl ChunkCapacity) -> ChunkSize
fn chunk_size(&self, chunk: &str, capacity: &impl ChunkCapacity) -> ChunkSize
Determine the size of a given chunk to use for validation.
Auto Trait Implementations§
impl RefUnwindSafe for Characters
impl Send for Characters
impl Sync for Characters
impl Unpin for Characters
impl UnwindSafe for Characters
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