pub struct StreamProgressCallback(/* private fields */);Expand description
Receives outgoing send progress on the thread polling the send; callbacks should return quickly.
Clones share the callback, and equality compares callback identity rather than behavior.
Debug prints the placeholder StreamProgressCallback without inspecting the closure.
Implementations§
Source§impl StreamProgressCallback
impl StreamProgressCallback
Sourcepub fn new(callback: impl Fn(StreamProgress) + Send + Sync + 'static) -> Self
pub fn new(callback: impl Fn(StreamProgress) + Send + Sync + 'static) -> Self
Wraps a callback that receives progress before compression.
Sourcepub fn call(&self, progress: StreamProgress)
pub fn call(&self, progress: StreamProgress)
Invokes the callback with the current progress.
Trait Implementations§
Source§impl Clone for StreamProgressCallback
impl Clone for StreamProgressCallback
Source§impl Debug for StreamProgressCallback
impl Debug for StreamProgressCallback
impl Eq for StreamProgressCallback
Auto Trait Implementations§
impl !RefUnwindSafe for StreamProgressCallback
impl !UnwindSafe for StreamProgressCallback
impl Freeze for StreamProgressCallback
impl Send for StreamProgressCallback
impl Sync for StreamProgressCallback
impl Unpin for StreamProgressCallback
impl UnsafeUnpin for StreamProgressCallback
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