pub struct Receiver<T>where
T: MachineImpl,{
pub receiver: Receiver<T>,
/* private fields */
}
Expand description
The Receiver is a wrapper aruond the Crossbeam receiver. It intentionally limits the surface of the receiver. Much of this is just boilerplate wrapping
Fields§
§receiver: Receiver<T>
Implementations§
Source§impl<T> Receiver<T>where
T: MachineImpl,
impl<T> Receiver<T>where
T: MachineImpl,
pub fn get_id(&self) -> usize
pub fn clone_receiver(&self) -> Receiver<T>
pub fn receiver(&self) -> &Receiver<T>
pub fn try_recv(&self) -> Result<T, TryRecvError>
pub fn recv(&self) -> Result<T, RecvError>
pub fn recv_timeout(&self, timeout: Duration) -> Result<T, RecvTimeoutError>
pub fn is_empty(&self) -> bool
pub fn is_full(&self) -> bool
pub fn len(&self) -> usize
pub fn capacity(&self) -> Option<usize>
pub fn iter(&self) -> Iter<'_, T>
pub fn try_iter(&self) -> TryIter<'_, T>
Trait Implementations§
impl<T> Eq for Receiver<T>where
T: MachineImpl,
Auto Trait Implementations§
impl<T> Freeze for Receiver<T>
impl<T> !RefUnwindSafe for Receiver<T>
impl<T> Send for Receiver<T>
impl<T> Sync for Receiver<T>
impl<T> Unpin for Receiver<T>where
T: Unpin,
impl<T> !UnwindSafe for Receiver<T>
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