pub struct ChunkMarkdownBuilder { /* private fields */ }
Expand description
Builder for ChunkMarkdown
.
Implementations§
Source§impl ChunkMarkdownBuilder
impl ChunkMarkdownBuilder
Sourcepub fn concurrency(&mut self, value: usize) -> &mut Self
pub fn concurrency(&mut self, value: usize) -> &mut Self
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<MarkdownSplitter<Characters>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn chunker<VALUE: Into<Arc<MarkdownSplitter<Characters>>>>( &mut self, value: VALUE, ) -> &mut Self
The markdown splitter from text_splitter
Defaults to a new MarkdownSplitter
with the specified max_characters
.
Sourcepub fn build(&self) -> Result<ChunkMarkdown, ChunkMarkdownBuilderError>
pub fn build(&self) -> Result<ChunkMarkdown, ChunkMarkdownBuilderError>
Trait Implementations§
Source§impl Clone for ChunkMarkdownBuilder
impl Clone for ChunkMarkdownBuilder
Source§fn clone(&self) -> ChunkMarkdownBuilder
fn clone(&self) -> ChunkMarkdownBuilder
Returns a duplicate 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 ChunkMarkdownBuilder
impl RefUnwindSafe for ChunkMarkdownBuilder
impl Send for ChunkMarkdownBuilder
impl Sync for ChunkMarkdownBuilder
impl Unpin for ChunkMarkdownBuilder
impl UnwindSafe for ChunkMarkdownBuilder
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