Struct doublecross::BiChannel [−][src]
Bi-directional communication build on, and usable with, crossbeam-channel channels.
Fields
rx: Receiver<T>
tx: Sender<U>
Methods
impl<T, U> BiChannel<T, U>
[src]
impl<T, U> BiChannel<T, U>
pub fn new(tx: Sender<U>, rx: Receiver<T>) -> Self
[src]
pub fn new(tx: Sender<U>, rx: Receiver<T>) -> Self
pub fn send(&self, msg: U)
[src]
pub fn send(&self, msg: U)
pub fn recv(&self) -> Option<T>
[src]
pub fn recv(&self) -> Option<T>
Trait Implementations
impl<'a, T, U> RecvArgument<'a, T> for &'a BiChannel<T, U>
[src]
impl<'a, T, U> RecvArgument<'a, T> for &'a BiChannel<T, U>
type Iter = IntoIter<&'a Receiver<T>>
fn _as_recv_argument(&'a self) -> Self::Iter
[src]
fn _as_recv_argument(&'a self) -> Self::Iter
Converts the argument into an iterator over receivers.
impl<'a, T, U> SendArgument<'a, T> for &'a BiChannel<U, T>
[src]
impl<'a, T, U> SendArgument<'a, T> for &'a BiChannel<U, T>
type Iter = IntoIter<&'a Sender<T>>
fn _as_send_argument(&'a self) -> Self::Iter
[src]
fn _as_send_argument(&'a self) -> Self::Iter
Converts the argument into an iterator over senders.