Skip to main content
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>,

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

pub fn with_error(self, error: KineticaError) -> Self

The result, with the error it failed with.

Source

pub fn compare_by_download_part_number(&self, other: &Self) -> Ordering

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

Source

pub fn success(file_name: impl Into<String>, op_mode: OpMode) -> Self

Creates a new successful operation result.

Source

pub fn failure( file_name: impl Into<String>, op_mode: OpMode, error: impl Into<String>, ) -> Self

Creates a new failed operation result.

Source

pub fn multipart_upload_success( file_name: impl Into<String>, upload_info: MultiPartUploadInfo, ) -> Self

Creates a new successful multi-part upload result.

Source

pub fn multipart_download_success( file_name: impl Into<String>, download_info: MultiPartDownloadInfo, ) -> Self

Creates a new successful multi-part download result.

Trait Implementations

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source

fn fmt(&self, f: &mut Formatter<’_>) -> Result

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Source

fn fmt(&self, f: &mut Formatter<’_>) -> Result

OperationResultfile_name=’..’, successful=.., error=.., error_message=.., op_mode=.., multi_part=.., upload_info=.., with None for what is absent.

Source

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source

fn ne(&self, other: &Rhs) -> bool

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