pub struct ChainSpscReceiver { /* private fields */ }Expand description
SPSC receiver handle over an explicit (pool, queue) pair.
Implementations§
Source§impl ChainSpscReceiver
impl ChainSpscReceiver
Sourcepub fn try_recv_into(&self, out: &mut [u8]) -> Result<Option<usize>, Error>
pub fn try_recv_into(&self, out: &mut [u8]) -> Result<Option<usize>, Error>
Receive into a caller-provided buffer.
Sourcepub fn try_recv_with<F, R, E>(
&self,
f: F,
) -> Result<Option<R>, RecvWithError<E>>
pub fn try_recv_with<F, R, E>( &self, f: F, ) -> Result<Option<R>, RecvWithError<E>>
Receive by borrowing the slot bytes for the duration of f.
Sourcepub fn try_recv_slot(&self) -> Result<Option<EventsSlot>, Error>
pub fn try_recv_slot(&self) -> Result<Option<EventsSlot>, Error>
Receive a message as an owned slot handle.
Sourcepub fn recv(&self, out: &mut [u8]) -> Option<usize>
pub fn recv(&self, out: &mut [u8]) -> Option<usize>
Convenience: best-effort poll (no error, returns None on empty or failure).
Sourcepub fn drain_batch_into(&self, out: &mut [u8], batch: usize) -> usize
pub fn drain_batch_into(&self, out: &mut [u8], batch: usize) -> usize
Poll and yield a bounded batch of messages, resetting the queue head/tail cache-line state.
This is intentionally minimal; higher layers should use WaitStrategy for idle behavior.
Trait Implementations§
impl Send for ChainSpscReceiver
Auto Trait Implementations§
impl Freeze for ChainSpscReceiver
impl !RefUnwindSafe for ChainSpscReceiver
impl !Sync for ChainSpscReceiver
impl Unpin for ChainSpscReceiver
impl !UnwindSafe for ChainSpscReceiver
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