pub struct FrameConsumer {
pub info: Frame,
/* private fields */
}Expand description
Used to consume a frame’s worth of data in chunks.
Fields§
§info: FrameImplementations§
Source§impl FrameConsumer
impl FrameConsumer
Sourcepub fn poll_read_all(&mut self, waiter: &Waiter) -> Poll<Result<Bytes>>
pub fn poll_read_all(&mut self, waiter: &Waiter) -> Poll<Result<Bytes>>
Poll for all remaining data without blocking.
Sourcepub async fn read_all(&mut self) -> Result<Bytes>
pub async fn read_all(&mut self) -> Result<Bytes>
Return all of the remaining chunks concatenated together.
Sourcepub fn poll_read_all_chunks(
&mut self,
waiter: &Waiter,
) -> Poll<Result<Vec<Bytes>>>
pub fn poll_read_all_chunks( &mut self, waiter: &Waiter, ) -> Poll<Result<Vec<Bytes>>>
Return all of the remaining chunks of the frame, without blocking.
Sourcepub fn poll_read_chunk(
&mut self,
waiter: &Waiter,
) -> Poll<Result<Option<Bytes>>>
pub fn poll_read_chunk( &mut self, waiter: &Waiter, ) -> Poll<Result<Option<Bytes>>>
Poll for the next chunk, without blocking.
Sourcepub async fn read_chunk(&mut self) -> Result<Option<Bytes>>
pub async fn read_chunk(&mut self) -> Result<Option<Bytes>>
Return the next chunk.
Sourcepub fn poll_read_chunks(&mut self, waiter: &Waiter) -> Poll<Result<Vec<Bytes>>>
pub fn poll_read_chunks(&mut self, waiter: &Waiter) -> Poll<Result<Vec<Bytes>>>
Poll for the next chunks, without blocking.
Sourcepub async fn read_chunks(&mut self) -> Result<Vec<Bytes>>
pub async fn read_chunks(&mut self) -> Result<Vec<Bytes>>
Read all of the remaining chunks into a vector.
Trait Implementations§
Source§impl Clone for FrameConsumer
impl Clone for FrameConsumer
Source§fn clone(&self) -> FrameConsumer
fn clone(&self) -> FrameConsumer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FrameConsumer
impl RefUnwindSafe for FrameConsumer
impl Send for FrameConsumer
impl Sync for FrameConsumer
impl Unpin for FrameConsumer
impl UnsafeUnpin for FrameConsumer
impl UnwindSafe for FrameConsumer
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