pub struct OperationResult {
pub success: bool,
pub source: PathBuf,
pub destination: PathBuf,
pub bytes_processed: u64,
pub error: Option<String>,
pub operation: OperationType,
pub compressed: bool,
pub original_filename: Option<String>,
pub checksum_verified: Option<bool>,
}
Expand description
Result of a file operation
Fields§
§success: bool
Whether the operation was successful
source: PathBuf
Source path that was processed
destination: PathBuf
Destination path where result was saved
bytes_processed: u64
Number of bytes processed
error: Option<String>
Error message if operation failed
operation: OperationType
Operation type that was performed
compressed: bool
Whether compression was used
original_filename: Option<String>
Original filename (for decryption operations)
checksum_verified: Option<bool>
Whether checksum verification passed (for decryption)
Implementations§
Source§impl OperationResult
impl OperationResult
Sourcepub fn success(
source: PathBuf,
destination: PathBuf,
bytes_processed: u64,
operation: OperationType,
compressed: bool,
) -> Self
pub fn success( source: PathBuf, destination: PathBuf, bytes_processed: u64, operation: OperationType, compressed: bool, ) -> Self
Create a successful operation result
Sourcepub fn success_with_metadata(
source: PathBuf,
destination: PathBuf,
bytes_processed: u64,
operation: OperationType,
compressed: bool,
original_filename: Option<String>,
checksum_verified: Option<bool>,
) -> Self
pub fn success_with_metadata( source: PathBuf, destination: PathBuf, bytes_processed: u64, operation: OperationType, compressed: bool, original_filename: Option<String>, checksum_verified: Option<bool>, ) -> Self
Create a successful operation result with metadata
Sourcepub fn failure(source: PathBuf, operation: OperationType, error: String) -> Self
pub fn failure(source: PathBuf, operation: OperationType, error: String) -> Self
Create a failed operation result
Trait Implementations§
Source§impl Clone for OperationResult
impl Clone for OperationResult
Source§fn clone(&self) -> OperationResult
fn clone(&self) -> OperationResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OperationResult
impl Debug for OperationResult
Auto Trait Implementations§
impl Freeze for OperationResult
impl RefUnwindSafe for OperationResult
impl Send for OperationResult
impl Sync for OperationResult
impl Unpin for OperationResult
impl UnwindSafe for OperationResult
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more