pub struct ChunkPolicy {
pub max_chunk_bytes: usize,
pub min_chunk_bytes: usize,
}Expand description
Recursive chunking parameters. Defaults sized for prose passages (≤ 4 KiB per chunk) — small enough to fit an embedding model input and large enough to keep the prefix-overhead ratio reasonable.
Fields§
§max_chunk_bytes: usize§min_chunk_bytes: usizeTrait Implementations§
Source§impl Clone for ChunkPolicy
impl Clone for ChunkPolicy
Source§fn clone(&self) -> ChunkPolicy
fn clone(&self) -> ChunkPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChunkPolicy
impl Debug for ChunkPolicy
Source§impl Default for ChunkPolicy
impl Default for ChunkPolicy
Source§impl<'de> Deserialize<'de> for ChunkPolicy
impl<'de> Deserialize<'de> for ChunkPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ChunkPolicy
impl RefUnwindSafe for ChunkPolicy
impl Send for ChunkPolicy
impl Sync for ChunkPolicy
impl Unpin for ChunkPolicy
impl UnsafeUnpin for ChunkPolicy
impl UnwindSafe for ChunkPolicy
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