pub struct ChunkResult {
pub chunk_id: usize,
pub extractions: Option<Vec<Extraction>>,
pub char_offset: usize,
pub char_length: usize,
pub success: bool,
pub error: Option<String>,
pub processing_time: Option<Duration>,
}
Expand description
Result from processing a single chunk
Fields§
§chunk_id: usize
ID of the chunk that was processed
extractions: Option<Vec<Extraction>>
Extractions found in this chunk
char_offset: usize
Character offset of this chunk in the original document
char_length: usize
Length of the chunk
success: bool
Whether processing was successful
error: Option<String>
Error message if processing failed
processing_time: Option<Duration>
Processing time for this chunk
Implementations§
Source§impl ChunkResult
impl ChunkResult
Sourcepub fn success(
chunk_id: usize,
extractions: Vec<Extraction>,
char_offset: usize,
char_length: usize,
) -> Self
pub fn success( chunk_id: usize, extractions: Vec<Extraction>, char_offset: usize, char_length: usize, ) -> Self
Create a successful chunk result
Sourcepub fn failure(
chunk_id: usize,
char_offset: usize,
char_length: usize,
error: String,
) -> Self
pub fn failure( chunk_id: usize, char_offset: usize, char_length: usize, error: String, ) -> Self
Create a failed chunk result
Sourcepub fn with_processing_time(self, duration: Duration) -> Self
pub fn with_processing_time(self, duration: Duration) -> Self
Set processing time
Trait Implementations§
Source§impl Clone for ChunkResult
impl Clone for ChunkResult
Source§fn clone(&self) -> ChunkResult
fn clone(&self) -> ChunkResult
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 ChunkResult
impl RefUnwindSafe for ChunkResult
impl Send for ChunkResult
impl Sync for ChunkResult
impl Unpin for ChunkResult
impl UnwindSafe for ChunkResult
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