pub struct DuplexChannel<T = (), R = ()> {
pub request: Channel<T>,
pub response: Channel<R>,
}
Expand description
DuplexChannel
contains 2 channels request
and response
meant to provide for a request/response pattern. This is useful
for any type of signaling, but especially during task termination,
where you can request a task to terminate and wait for a response
confirming its termination.
Fields§
§request: Channel<T>
§response: Channel<R>
Implementations§
Trait Implementations§
Source§impl<T: Clone, R: Clone> Clone for DuplexChannel<T, R>
impl<T: Clone, R: Clone> Clone for DuplexChannel<T, R>
Source§fn clone(&self) -> DuplexChannel<T, R>
fn clone(&self) -> DuplexChannel<T, R>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T, R> Freeze for DuplexChannel<T, R>
impl<T, R> RefUnwindSafe for DuplexChannel<T, R>
impl<T, R> Send for DuplexChannel<T, R>
impl<T, R> Sync for DuplexChannel<T, R>
impl<T = (), R = ()> !Unpin for DuplexChannel<T, R>
impl<T, R> UnwindSafe for DuplexChannel<T, R>
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