pub struct ProgressSender { /* private fields */ }Expand description
Non-blocking sender for progress updates from fetch tasks.
Cheap to clone and safe to use from multiple concurrent futures. Dropped messages are acceptable — progress is best-effort UI feedback.
Implementations§
Source§impl ProgressSender
impl ProgressSender
Sourcepub fn send(&self, fetched: usize)
pub fn send(&self, fetched: usize)
Send a progress update without blocking.
Uses try_send — if the channel is full, the update is silently dropped.
This is intentional: progress is best-effort UI feedback, and dropping
updates is always preferable to blocking fetch tasks.
§Examples
let (sender, mut receiver) = deps_engine::progress::channel(10);
sender.send(3);
let update = receiver.try_recv().unwrap();
assert_eq!((update.fetched, update.total), (3, 10));Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProgressSender
impl RefUnwindSafe for ProgressSender
impl Send for ProgressSender
impl Sync for ProgressSender
impl Unpin for ProgressSender
impl UnsafeUnpin for ProgressSender
impl UnwindSafe for ProgressSender
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