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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BatchResponse
impl Debug for BatchResponse
Source§impl<'de> Deserialize<'de> for BatchResponse
impl<'de> Deserialize<'de> for BatchResponse
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>,
Auto Trait Implementations§
impl Freeze for BatchResponse
impl RefUnwindSafe for BatchResponse
impl Send for BatchResponse
impl Sync for BatchResponse
impl Unpin for BatchResponse
impl UnsafeUnpin for BatchResponse
impl UnwindSafe for BatchResponse
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request