pub struct NoopProgressListener;Expand description
A no-op progress listener for when you don’t care about progress.
Useful for background/batch uploads where no output is desired.
use youtube_uploader::NoopProgressListener;
use youtube_uploader::ProgressListener;
let listener = NoopProgressListener;
listener.on_progress(50, 100); // does nothingTrait Implementations§
Source§impl ProgressListener for NoopProgressListener
impl ProgressListener for NoopProgressListener
Source§fn on_progress(&self, _uploaded: u64, _total: u64)
fn on_progress(&self, _uploaded: u64, _total: u64)
Called periodically with bytes uploaded and total file size.
Source§fn on_complete(&self, _result: &UploadResult)
fn on_complete(&self, _result: &UploadResult)
Called when upload completes successfully.
Source§fn on_error(&self, _error: &UploadError)
fn on_error(&self, _error: &UploadError)
Called when upload fails.
Auto Trait Implementations§
impl Freeze for NoopProgressListener
impl RefUnwindSafe for NoopProgressListener
impl Send for NoopProgressListener
impl Sync for NoopProgressListener
impl Unpin for NoopProgressListener
impl UnsafeUnpin for NoopProgressListener
impl UnwindSafe for NoopProgressListener
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