pub struct TileSplit { /* private fields */ }Expand description
The chunking engine.
Implementations§
Source§impl TileSplit
impl TileSplit
pub fn new(config: SplitConfig) -> Self
Sourcepub fn split_by(&self, text: &str, delimiter: &str) -> Vec<Chunk>
pub fn split_by(&self, text: &str, delimiter: &str) -> Vec<Chunk>
Split with a custom delimiter.
Sourcepub fn split_code(&self, code: &str) -> Vec<Chunk>
pub fn split_code(&self, code: &str) -> Vec<Chunk>
Split code into logical blocks (functions, classes).
Sourcepub fn stats(&self, text: &str, chunks: &[Chunk]) -> SplitStats
pub fn stats(&self, text: &str, chunks: &[Chunk]) -> SplitStats
Compute stats about a split result.
Auto Trait Implementations§
impl Freeze for TileSplit
impl RefUnwindSafe for TileSplit
impl Send for TileSplit
impl Sync for TileSplit
impl Unpin for TileSplit
impl UnsafeUnpin for TileSplit
impl UnwindSafe for TileSplit
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