pub struct ParallelStrategy;Expand description
Parallel splitting strategy powered by rayon.
Requires the rayon feature. The output is byte-for-byte identical to
SequentialStrategy; only the order in which independent recursive
branches are evaluated changes.
Trait Implementations§
Source§impl Clone for ParallelStrategy
impl Clone for ParallelStrategy
impl Copy for ParallelStrategy
Source§impl Debug for ParallelStrategy
impl Debug for ParallelStrategy
Source§impl Default for ParallelStrategy
impl Default for ParallelStrategy
Source§impl SplitterStrategy for ParallelStrategy
Available on crate feature rayon only.
impl SplitterStrategy for ParallelStrategy
Available on crate feature
rayon only.Source§fn split(
&self,
splitter: &RecursiveCharacterTextSplitter,
text: &str,
) -> Vec<Chunk>
fn split( &self, splitter: &RecursiveCharacterTextSplitter, text: &str, ) -> Vec<Chunk>
Splits
text into chunks.Source§fn split_content(
&self,
splitter: &RecursiveCharacterTextSplitter,
text: &str,
) -> Vec<String>
fn split_content( &self, splitter: &RecursiveCharacterTextSplitter, text: &str, ) -> Vec<String>
Splits
text into chunk contents. Read moreAuto Trait Implementations§
impl Freeze for ParallelStrategy
impl RefUnwindSafe for ParallelStrategy
impl Send for ParallelStrategy
impl Sync for ParallelStrategy
impl Unpin for ParallelStrategy
impl UnsafeUnpin for ParallelStrategy
impl UnwindSafe for ParallelStrategy
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,
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