Struct iroh_blobs::util::progress::AsyncChannelProgressSender
source · pub struct AsyncChannelProgressSender<T> { /* private fields */ }
Expand description
A progress sender that uses an async channel.
Implementations§
source§impl<T> AsyncChannelProgressSender<T>
impl<T> AsyncChannelProgressSender<T>
sourcepub fn new(sender: Sender<T>) -> Self
pub fn new(sender: Sender<T>) -> Self
Create a new progress sender from an async channel sender.
sourcepub fn same_channel(&self, other: &AsyncChannelProgressSender<T>) -> bool
pub fn same_channel(&self, other: &AsyncChannelProgressSender<T>) -> bool
Returns true if other
sends on the same async_channel
channel as self
.
Trait Implementations§
source§impl<T> Clone for AsyncChannelProgressSender<T>
impl<T> Clone for AsyncChannelProgressSender<T>
source§impl<T> Debug for AsyncChannelProgressSender<T>
impl<T> Debug for AsyncChannelProgressSender<T>
source§impl<T> IdGenerator for AsyncChannelProgressSender<T>
impl<T> IdGenerator for AsyncChannelProgressSender<T>
source§impl<T: Send + Sync + 'static> ProgressSender for AsyncChannelProgressSender<T>
impl<T: Send + Sync + 'static> ProgressSender for AsyncChannelProgressSender<T>
source§async fn send(&self, msg: Self::Msg) -> Result<(), ProgressSendError>
async fn send(&self, msg: Self::Msg) -> Result<(), ProgressSendError>
Send a message and wait if the receiver is full. Read more
source§fn try_send(&self, msg: Self::Msg) -> Result<(), ProgressSendError>
fn try_send(&self, msg: Self::Msg) -> Result<(), ProgressSendError>
Try to send a message and drop it if the receiver is full. Read more
source§fn blocking_send(&self, msg: Self::Msg) -> Result<(), ProgressSendError>
fn blocking_send(&self, msg: Self::Msg) -> Result<(), ProgressSendError>
Send a message and block if the receiver is full. Read more
source§fn with_map<U: Send + Sync + 'static, F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static>(
self,
f: F
) -> WithMap<Self, U, F>
fn with_map<U: Send + Sync + 'static, F: Fn(U) -> Self::Msg + Send + Sync + Clone + 'static>( self, f: F ) -> WithMap<Self, U, F>
Transform the message type by mapping to the type of this sender.
source§fn with_filter_map<U: Send + Sync + 'static, F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static>(
self,
f: F
) -> WithFilterMap<Self, U, F>
fn with_filter_map<U: Send + Sync + 'static, F: Fn(U) -> Option<Self::Msg> + Send + Sync + Clone + 'static>( self, f: F ) -> WithFilterMap<Self, U, F>
Transform the message type by filter-mapping to the type of this sender.
source§fn boxed(self) -> BoxedProgressSender<Self::Msg>where
Self: IdGenerator,
fn boxed(self) -> BoxedProgressSender<Self::Msg>where
Self: IdGenerator,
Create a boxed progress sender to get rid of the concrete type.
Auto Trait Implementations§
impl<T> Freeze for AsyncChannelProgressSender<T>
impl<T> RefUnwindSafe for AsyncChannelProgressSender<T>
impl<T> Send for AsyncChannelProgressSender<T>where
T: Send,
impl<T> Sync for AsyncChannelProgressSender<T>where
T: Send,
impl<T> Unpin for AsyncChannelProgressSender<T>
impl<T> UnwindSafe for AsyncChannelProgressSender<T>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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