pub struct FramedConsumer<Q, H = u16>{ /* private fields */ }Expand description
A consumer handle that can be used to read framed chunks
Implementations§
Source§impl<Q, H> FramedConsumer<Q, H>
impl<Q, H> FramedConsumer<Q, H>
Sourcepub fn read(&self) -> Result<FramedGrantR<Q, H>, ReadGrantError>
pub fn read(&self) -> Result<FramedGrantR<Q, H>, ReadGrantError>
Attempt to receive a single frame
The FramedConsumer has no control over the size of the read grant, we see whatever size was written by the FramedProducer.
The returned grant must be released to free the space in the buffer.
Source§impl<Q, H> FramedConsumer<Q, H>
impl<Q, H> FramedConsumer<Q, H>
pub async fn wait_read(&self) -> FramedGrantR<Q, H>
Auto Trait Implementations§
impl<Q, H> Freeze for FramedConsumer<Q, H>
impl<Q, H> RefUnwindSafe for FramedConsumer<Q, H>
impl<Q, H> Send for FramedConsumer<Q, H>
impl<Q, H> Sync for FramedConsumer<Q, H>
impl<Q, H> Unpin for FramedConsumer<Q, H>
impl<Q, H> UnwindSafe for FramedConsumer<Q, H>
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