pub struct ReadHalf<'a, M: RingMem> { /* private fields */ }
Expand description
The reader for the incoming ring buffer of a Queue
.
Implementations§
Source§impl<'a, M: RingMem> ReadHalf<'a, M>
impl<'a, M: RingMem> ReadHalf<'a, M>
Sourcepub fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
pub fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
Polls the incoming ring for more packets.
This will automatically manage interrupt masking. The queue will keep interrupts masked until this is called. Once this is called, interrupts will remain unmasked until this or another poll or async read function is called again.
Sourcepub fn poll_read_batch<'b>(
&'b mut self,
cx: &mut Context<'_>,
) -> Poll<Result<ReadBatch<'b, M>, Error>>
pub fn poll_read_batch<'b>( &'b mut self, cx: &mut Context<'_>, ) -> Poll<Result<ReadBatch<'b, M>, Error>>
Polls the incoming ring for more packets and returns a batch reader for them.
This will manage interrupt masking as described in Self::poll_ready
.
Sourcepub fn try_read_batch(&mut self) -> Result<ReadBatch<'_, M>, TryReadError>
pub fn try_read_batch(&mut self) -> Result<ReadBatch<'_, M>, TryReadError>
Tries to get a reader for the next batch of packets.
Sourcepub fn read_batch<'b>(&'b mut self) -> BatchRead<'a, 'b, M> ⓘ
pub fn read_batch<'b>(&'b mut self) -> BatchRead<'a, 'b, M> ⓘ
Waits for the next batch of packets to be ready and returns a reader for them.
This will manage interrupt masking as described in Self::poll_ready
.
Sourcepub fn try_read(&mut self) -> Result<PacketRef<'_, M>, TryReadError>
pub fn try_read(&mut self) -> Result<PacketRef<'_, M>, TryReadError>
Tries to read the next packet.
Returns Err(TryReadError::Empty)
if the ring is empty.
Sourcepub fn read<'b>(&'b mut self) -> Read<'a, 'b, M> ⓘ
pub fn read<'b>(&'b mut self) -> Read<'a, 'b, M> ⓘ
Waits for the next packet to be ready and returns it.
Sourcepub fn supports_pending_send_size(&self) -> bool
pub fn supports_pending_send_size(&self) -> bool
Indicates whether pending send size notification is supported on the vmbus ring.