> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# BatchInsertionResult

> BatchInsertionResult — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[bulk\_inserter](https://docs.kinetica.com/content/api/rust/bulk_inserter/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/bulk_inserter.rs#L715-L737)&#x20;

<pre>`pub struct BatchInsertionResult {    pub worker_url: String,    pub batch_size: usize,    pub count_inserted: i64,    pub count_updated: i64,    pub success: bool,    pub error_message: Option<String>,    pub encode_time_ms: f64,    pub network_time_ms: f64,    pub total_time_ms: f64,    pub attempt: usize,}`</pre>

Result of a batch insertion attempt. This is passed to the batch listener callback after each batch completes.

Fields
`worker_url: String`

Worker URL the batch was sent to

`batch_size: usize`

Number of records in the batch

`count_inserted: i64`

Number of records successfully inserted

`count_updated: i64`

Number of records successfully updated (upserts)

`success: bool`

Whether the insertion succeeded

`error_message: Option<String>`

Error message if failed

`encode_time_ms: f64`

Time taken to build the request (milliseconds): encoding the records, and compressing them if Snappy applies

`network_time_ms: f64`

Time taken for network transfer (milliseconds)

`total_time_ms: f64`

Total time for the batch (milliseconds)

`attempt: usize`

Retry attempt number (0 = first attempt)

## Trait Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/bulk_inserter.rs#L714)
impl [Clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html) for [BatchInsertionResult](https://docs.kinetica.com/content/api/rust/bulk_inserter/struct.BatchInsertionResult.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/bulk_inserter.rs#L714)
fn [clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)(\&self) -> [BatchInsertionResult](https://docs.kinetica.com/content/api/rust/bulk_inserter/struct.BatchInsertionResult.md)

Returns a duplicate of the value. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)

1.0.0 (const: [unstable](https://github.com/rust-lang/rust/issues/142757)) · [Source](https://doc.rust-lang.org/1.98.1/src/core/clone.rs.html#245-247)
fn [clone\_from](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)(\&mut self, source: \&Self)

Performs copy-assignment from `source`. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/bulk_inserter.rs#L714)
impl [Debug](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html) for [BatchInsertionResult](https://docs.kinetica.com/content/api/rust/bulk_inserter/struct.BatchInsertionResult.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/bulk_inserter.rs#L714)
fn [fmt](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)(\&self, f: \&mut [Formatter](https://doc.rust-lang.org/1.98.1/core/fmt/struct.Formatter.html)\<'\_>) -> [Result](https://doc.rust-lang.org/1.98.1/core/fmt/type.Result.html)

Formats the value using the given formatter. [Read more](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.