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: StringName of the file uploaded/downloaded
full_file_names: Vec<String>Names of all files in case of full file upload
successful: boolWhether 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: boolWhether 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
pub fn with_error(self, error: KineticaError) -> Self
The result, with the error it failed with.
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.
Creates a new successful operation result.
Creates a new failed operation result.
pub fn multipart_upload_success( file_name: impl Into<String>, upload_info: MultiPartUploadInfo, ) -> Self
Creates a new successful multi-part upload result.
pub fn multipart_download_success( file_name: impl Into<String>, download_info: MultiPartDownloadInfo, ) -> Self
Creates a new successful multi-part download result.
Trait Implementations
impl Clone for OperationResult
fn clone(&self) -> OperationResult
fn clone_from(&mut self, source: &Self)
source. Read more