pub struct ChunkTextBuilder { /* private fields */ }Expand description
Builder for ChunkText.
Implementations§
Source§impl ChunkTextBuilder
impl ChunkTextBuilder
Sourcepub fn concurrency(&mut self, value: usize) -> &mut Self
pub fn concurrency(&mut self, value: usize) -> &mut Self
The max number of concurrent chunks to process.
Defaults to None. If you use a splitter that is resource heavy, this parameter can be
tuned.
Sourcepub fn max_characters(&mut self, value: usize) -> &mut Self
pub fn max_characters(&mut self, value: usize) -> &mut Self
Optional maximum number of characters per chunk.
Defaults to [DEFAULT_MAX_CHAR_SIZE].
Sourcepub fn range(&mut self, value: Range<usize>) -> &mut Self
pub fn range(&mut self, value: Range<usize>) -> &mut Self
A range of minimum and maximum characters per chunk.
Chunks smaller than the range min will be ignored. max_characters will be ignored if this
is set.
If you provide a custom chunker with a range, you might want to set the range as well.
Defaults to 0..[max_characters]
Sourcepub fn chunker<VALUE: Into<Arc<TextSplitter<Characters>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn chunker<VALUE: Into<Arc<TextSplitter<Characters>>>>( &mut self, value: VALUE, ) -> &mut Self
The text splitter from text_splitter
Defaults to a new TextSplitter with the specified max_characters.
Trait Implementations§
Source§impl Clone for ChunkTextBuilder
impl Clone for ChunkTextBuilder
Source§fn clone(&self) -> ChunkTextBuilder
fn clone(&self) -> ChunkTextBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChunkTextBuilder
impl RefUnwindSafe for ChunkTextBuilder
impl Send for ChunkTextBuilder
impl Sync for ChunkTextBuilder
impl Unpin for ChunkTextBuilder
impl UnwindSafe for ChunkTextBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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