Struct zellij_utils::channels::SenderWithContext [−][src]
pub struct SenderWithContext<T> { /* fields omitted */ }
Expand description
Sends messages on an MPSC channel, along with an ErrorContext
,
synchronously or asynchronously depending on the underlying [SenderType
].
Implementations
impl<T: Clone> SenderWithContext<T>
[src]
impl<T: Clone> SenderWithContext<T>
[src]pub fn new(sender: Sender<(T, ErrorContext)>) -> Self
[src]
pub fn send(&self, event: T) -> Result<(), SendError<(T, ErrorContext)>>
[src]
pub fn send(&self, event: T) -> Result<(), SendError<(T, ErrorContext)>>
[src]Sends an event, along with the current ErrorContext
, on this
SenderWithContext
’s channel.
Trait Implementations
impl<T: Clone> Clone for SenderWithContext<T>
[src]
impl<T: Clone> Clone for SenderWithContext<T>
[src]fn clone(&self) -> SenderWithContext<T>
[src]
fn clone(&self) -> SenderWithContext<T>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for SenderWithContext<T>
impl<T> Send for SenderWithContext<T> where
T: Send,
T: Send,
impl<T> Sync for SenderWithContext<T> where
T: Send,
T: Send,
impl<T> Unpin for SenderWithContext<T>
impl<T> UnwindSafe for SenderWithContext<T>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more