> ## 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.

# OperationResult

> OperationResult — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[filesystem](https://docs.kinetica.com/content/api/rust/filesystem/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L200-L220)&#x20;

<pre>`pub struct OperationResult {    pub file_name: String,    pub full_file_names: Vec<String>,    pub successful: bool,    pub error: Option<KineticaError>,    pub error_message: Option<String>,    pub op_mode: Option<OpMode>,    pub multi_part: bool,    pub upload_info: Option<MultiPartUploadInfo>,    pub download_info: Option<MultiPartDownloadInfo>,}`</pre>

Result of an upload or download operation.This struct encapsulates information about the outcome of a file transfer, including success/failure status, error information, and multi-part details.Results compare and hash by `successful`, `multi_part`, `file_name`, `error_message` and `op_mode`.

Fields
`file_name: String`

Name of the file uploaded/downloaded

`full_file_names: Vec<String>`

Names of all files in case of full file upload

`successful: bool`

Whether the upload/download was successful

`error: Option<KineticaError>`

The error the operation failed with, where there is one: the server’s or the multi-part job’s, or the local file’s

`error_message: Option<String>`

Error message if the operation failed

`op_mode: Option<OpMode>`

Indicates whether it is an upload or download

`multi_part: bool`

Whether this result is for a multi-part operation

`upload_info: Option<MultiPartUploadInfo>`

Information about a multi-part upload (if applicable)

`download_info: Option<MultiPartDownloadInfo>`

Information about a multi-part download (if applicable)

## Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L240-L304)
impl [OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L242-L245)
pub fn [with\_error](#method.with_error)(self, error: [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)) -> Self

The result, with the error it failed with.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L249-L252)
pub fn [compare\_by\_download\_part\_number](#method.compare_by_download_part_number)(\&self, other: \&Self) -> [Ordering](https://doc.rust-lang.org/1.98.1/core/cmp/enum.Ordering.html)

Orders results by their download part number, for `sort_by`. A result that is not a download part comes first.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L255-L262)
pub fn [success](#method.success)(file\_name: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, op\_mode: [OpMode](https://docs.kinetica.com/content/api/rust/filesystem/enum.OpMode.md)) -> Self

Creates a new successful operation result.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L265-L273)
pub fn [failure](#method.failure)( file\_name: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, op\_mode: [OpMode](https://docs.kinetica.com/content/api/rust/filesystem/enum.OpMode.md), error: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, ) -> Self

Creates a new failed operation result.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L276-L288)
pub fn [multipart\_upload\_success](#method.multipart_upload_success)( file\_name: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, upload\_info: [MultiPartUploadInfo](https://docs.kinetica.com/content/api/rust/filesystem/struct.MultiPartUploadInfo.md), ) -> Self

Creates a new successful multi-part upload result.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L291-L303)
pub fn [multipart\_download\_success](#method.multipart_download_success)( file\_name: impl [Into](https://doc.rust-lang.org/1.98.1/core/convert/trait.Into.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, download\_info: [MultiPartDownloadInfo](https://docs.kinetica.com/content/api/rust/filesystem/struct.MultiPartDownloadInfo.md), ) -> Self

Creates a new successful multi-part download result.

## Trait Implementations

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

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L199)
fn [clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)(\&self) -> [OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.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/filesystem/types.rs#L199)
impl [Debug](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html) for [OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L199)
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)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L199)
impl [Default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html) for [OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L199)
fn [default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)() -> [OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)

Returns the “default value” for a type. [Read more](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L306-L324)
impl [Display](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Display.html) for [OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L310-L323)
fn [fmt](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Display.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)

`OperationResult{file_name='..', successful=.., error=.., error_message=.., op_mode=.., multi_part=.., upload_info=..}`, with `None` for what is absent.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L232)
impl [Eq](https://doc.rust-lang.org/1.98.1/core/cmp/trait.Eq.html) for [OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L234-L238)
impl [Hash](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hash.html) for [OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L235-L237)
fn [hash](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hash.html#tymethod.hash)\<H: [Hasher](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hasher.html)>(\&self, state: [\&mut H](https://doc.rust-lang.org/1.98.1/std/primitive.reference.html))

Feeds this value into the given [`Hasher`](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hasher.html). [Read more](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hash.html#tymethod.hash)

1.3.0 · [Source](https://doc.rust-lang.org/1.98.1/src/core/hash/mod.rs.html#234-236)

#### fn [hash\_slice](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hash.html#method.hash_slice)\<H>(data: &\[Self], state: [\&mut H](https://doc.rust-lang.org/1.98.1/std/primitive.reference.html))&#xA;where H: [Hasher](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hasher.html), Self: [Sized](https://doc.rust-lang.org/1.98.1/core/marker/trait.Sized.html),

Feeds a slice of this type into the given [`Hasher`](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hasher.html). [Read more](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hash.html#method.hash_slice)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L222-L230)
impl [PartialEq](https://doc.rust-lang.org/1.98.1/core/cmp/trait.PartialEq.html) for [OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/types.rs#L223-L229)
fn [eq](https://doc.rust-lang.org/1.98.1/core/cmp/trait.PartialEq.html#tymethod.eq)(\&self, other: \&Self) -> [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)

Tests for `self` and `other` values to be equal, and is used by `==`.

1.0.0 (const: [unstable](https://github.com/rust-lang/rust/issues/143800)) · [Source](https://doc.rust-lang.org/1.98.1/src/core/cmp.rs.html#263)
fn [ne](https://doc.rust-lang.org/1.98.1/core/cmp/trait.PartialEq.html#method.ne)(\&self, other: [\&Rhs](https://doc.rust-lang.org/1.98.1/std/primitive.reference.html)) -> [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)

Tests for `!=`. The default implementation is almost always sufficient, and should not be overridden without very good reason.


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