Struct channel::diem_channel::Sender
source · pub struct Sender<K: Eq + Hash + Clone, M> { /* private fields */ }
Expand description
The sending end of the diem_channel.
Implementations§
source§impl<K: Eq + Hash + Clone, M> Sender<K, M>
impl<K: Eq + Hash + Clone, M> Sender<K, M>
sourcepub fn push(&self, key: K, message: M) -> Result<()>
pub fn push(&self, key: K, message: M) -> Result<()>
This adds the message into the internal queue data structure. This is a synchronous call.
sourcepub fn push_with_feedback(
&self,
key: K,
message: M,
status_ch: Option<Sender<ElementStatus<M>>>
) -> Result<()>
pub fn push_with_feedback( &self, key: K, message: M, status_ch: Option<Sender<ElementStatus<M>>> ) -> Result<()>
Same as push
, but this function also accepts a oneshot::Sender over
which the sender can be notified when the message eventually gets
delivered or dropped.
Trait Implementations§
Auto Trait Implementations§
impl<K, M> RefUnwindSafe for Sender<K, M>
impl<K, M> Send for Sender<K, M>
impl<K, M> Sync for Sender<K, M>
impl<K, M> Unpin for Sender<K, M>
impl<K, M> UnwindSafe for Sender<K, M>
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