FramedConsumer

Struct FramedConsumer 

Source
pub struct FramedConsumer<Q, H = u16>
where Q: BbqHandle, H: LenHeader,
{ /* private fields */ }
Expand description

A consumer handle that can be used to read framed chunks

Implementations§

Source§

impl<Q, H> FramedConsumer<Q, H>
where Q: BbqHandle, H: LenHeader,

Source

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>

Source

pub async fn wait_read(&self) -> FramedGrantR<Q, H>

Auto Trait Implementations§

§

impl<Q, H> Freeze for FramedConsumer<Q, H>
where <Q as BbqHandle>::Target: Freeze,

§

impl<Q, H> RefUnwindSafe for FramedConsumer<Q, H>

§

impl<Q, H> Send for FramedConsumer<Q, H>
where <Q as BbqHandle>::Target: Send, H: Send,

§

impl<Q, H> Sync for FramedConsumer<Q, H>
where <Q as BbqHandle>::Target: Sync, H: Sync,

§

impl<Q, H> Unpin for FramedConsumer<Q, H>
where <Q as BbqHandle>::Target: Unpin, H: Unpin,

§

impl<Q, H> UnwindSafe for FramedConsumer<Q, H>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.