pub struct TranscodeProgress { /* private fields */ }Expand description
Counts how much work a crate::Transcoder completed before returning.
Implementations§
Source§impl TranscodeProgress
impl TranscodeProgress
Sourcepub const fn new(status: TranscodeStatus, read: usize, written: usize) -> Self
pub const fn new(status: TranscodeStatus, read: usize, written: usize) -> Self
Sourcepub const fn complete(read: usize, written: usize) -> Self
pub const fn complete(read: usize, written: usize) -> Self
Creates a completed progress value.
§Parameters
read: Number of consumed input units.written: Number of produced output units.
§Returns
Returns a progress value whose status is TranscodeStatus::Complete.
Sourcepub const fn status(self) -> TranscodeStatus
pub const fn status(self) -> TranscodeStatus
Sourcepub const fn read(self) -> usize
pub const fn read(self) -> usize
Returns the number of input units consumed by the call.
§Returns
Returns a count relative to the input index passed to the conversion call.
Sourcepub const fn written(self) -> usize
pub const fn written(self) -> usize
Returns the number of output units written by the call.
§Returns
Returns a count relative to the output index passed to the conversion call.
Sourcepub const fn required(self) -> usize
pub const fn required(self) -> usize
Returns the additional unit count required by the reported status.
§Returns
Returns 0 when conversion completed.
Sourcepub const fn index(self) -> Option<usize>
pub const fn index(self) -> Option<usize>
Returns the absolute boundary index associated with this status, if any.
- For
TranscodeStatus::NeedInput, returnsinput_index. - For
TranscodeStatus::NeedOutput, returnsoutput_index. - For
TranscodeStatus::Complete, returnsNone.
Trait Implementations§
Source§impl Clone for TranscodeProgress
impl Clone for TranscodeProgress
Source§fn clone(&self) -> TranscodeProgress
fn clone(&self) -> TranscodeProgress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TranscodeProgress
impl Debug for TranscodeProgress
Source§impl PartialEq for TranscodeProgress
impl PartialEq for TranscodeProgress
Source§fn eq(&self, other: &TranscodeProgress) -> bool
fn eq(&self, other: &TranscodeProgress) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TranscodeProgress
impl Eq for TranscodeProgress
impl StructuralPartialEq for TranscodeProgress
Auto Trait Implementations§
impl Freeze for TranscodeProgress
impl RefUnwindSafe for TranscodeProgress
impl Send for TranscodeProgress
impl Sync for TranscodeProgress
impl Unpin for TranscodeProgress
impl UnsafeUnpin for TranscodeProgress
impl UnwindSafe for TranscodeProgress
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