Skip to main content

create_chunker

Function create_chunker 

Source
pub fn create_chunker(name: &str) -> Result<Box<dyn Chunker>>
Expand description

Creates a chunker by name.

§Arguments

  • name - Chunker strategy name: “fixed”, “semantic”, “code”, or “parallel”.

§Returns

A boxed chunker trait object, or an error for unknown strategies.

§Errors

Returns crate::error::ChunkingError::UnknownStrategy if the strategy name is not recognized.