pub struct BatchResponse {
pub success: bool,
pub collection: String,
pub operation: String,
pub total_operations: usize,
pub successful_operations: usize,
pub failed_operations: usize,
pub duration_ms: u64,
pub errors: Vec<String>,
pub results: Vec<BatchResultEntry>,
}Expand description
Batch response.
Tolerant of both the old (pre-v3) {success, operation, total_operations, successful_operations, failed_operations, duration_ms, errors} shape
and the v3.0.x server’s /insert_texts response
{collection, count, inserted, failed, results}. All fields default to
empty/zero/false when absent so callers can match on whichever pair the
running server emits without branching on version.
Fields§
§success: boolWhether the operation was successful (pre-v3 shape; v3 emits
inserted/failed instead — left false and the caller
should inspect successful_operations > 0 && failed_operations == 0).
collection: StringCollection name (both shapes emit this).
operation: StringOperation type (pre-v3 only; v3 omits).
total_operations: usizeTotal number of operations (pre-v3 shape). v3 emits count —
normalised into this field via the alias.
successful_operations: usizeNumber of successful operations (pre-v3 shape). v3 emits
inserted — aliased so either maps onto this field.
failed_operations: usizeNumber of failed operations. Same field name in both shapes.
duration_ms: u64Duration in milliseconds (pre-v3 only).
errors: Vec<String>Error messages (pre-v3 shape).
results: Vec<BatchResultEntry>Per-entry result records emitted by v3 /insert_texts. Each
record carries the client-sent id (client_id) and the
server-assigned UUIDs under vector_ids; use this when the
server reassigns ids on insert.
Trait Implementations§
Source§impl Clone for BatchResponse
impl Clone for BatchResponse
Source§fn clone(&self) -> BatchResponse
fn clone(&self) -> BatchResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more