pub struct ProcessingResult {
pub book_name: String,
pub success: bool,
pub output_path: Option<PathBuf>,
pub processing_time: f64,
pub error_message: Option<String>,
pub output_size: Option<u64>,
pub used_copy_mode: bool,
}Expand description
Result of processing a single audiobook
Fields§
§book_name: StringName of the book
success: boolWhether processing was successful
output_path: Option<PathBuf>Path to the output M4B file (if successful)
processing_time: f64Processing time in seconds
error_message: Option<String>Error message (if failed)
output_size: Option<u64>Size of output file in bytes (if successful)
used_copy_mode: boolWhether copy mode was used (no re-encoding)
Implementations§
Source§impl ProcessingResult
impl ProcessingResult
Sourcepub fn success(
self,
output_path: PathBuf,
processing_time: f64,
used_copy_mode: bool,
) -> Self
pub fn success( self, output_path: PathBuf, processing_time: f64, used_copy_mode: bool, ) -> Self
Mark as successful with output path
Sourcepub fn failure(self, error_message: String, processing_time: f64) -> Self
pub fn failure(self, error_message: String, processing_time: f64) -> Self
Mark as failed with error message
Sourcepub fn output_size_mb(&self) -> Option<f64>
pub fn output_size_mb(&self) -> Option<f64>
Get output file size in MB
Trait Implementations§
Source§impl Clone for ProcessingResult
impl Clone for ProcessingResult
Source§fn clone(&self) -> ProcessingResult
fn clone(&self) -> ProcessingResult
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 ProcessingResult
impl Debug for ProcessingResult
Source§impl<'de> Deserialize<'de> for ProcessingResult
impl<'de> Deserialize<'de> for ProcessingResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ProcessingResult
impl Display for ProcessingResult
Auto Trait Implementations§
impl Freeze for ProcessingResult
impl RefUnwindSafe for ProcessingResult
impl Send for ProcessingResult
impl Sync for ProcessingResult
impl Unpin for ProcessingResult
impl UnwindSafe for ProcessingResult
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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