pub struct Subscriber<T: Copy> { /* private fields */ }Expand description
The read side of a Photon SPMC channel.
Each subscriber has its own cursor — no contention between consumers.
Implementations§
Source§impl<T: Copy> Subscriber<T>
impl<T: Copy> Subscriber<T>
Sourcepub fn try_recv(&mut self) -> Result<T, TryRecvError>
pub fn try_recv(&mut self) -> Result<T, TryRecvError>
Try to receive the next message without blocking.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Subscriber<T>
impl<T> !RefUnwindSafe for Subscriber<T>
impl<T> Sync for Subscriber<T>where
T: Send,
impl<T> Unpin for Subscriber<T>
impl<T> UnsafeUnpin for Subscriber<T>
impl<T> !UnwindSafe for Subscriber<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