pub struct GroupConsumer {
pub info: Group,
/* private fields */
}Expand description
Consume a group, frame-by-frame.
Fields§
§info: GroupImplementations§
Source§impl GroupConsumer
impl GroupConsumer
Sourcepub async fn read_frame(&mut self) -> Result<Option<Bytes>>
pub async fn read_frame(&mut self) -> Result<Option<Bytes>>
Read the next frame’s data all at once.
Cancel-safe: if cancelled after obtaining the frame but before reading, we retry from the same index and create a fresh consumer.
Sourcepub async fn get_frame(&self, index: usize) -> Result<Option<FrameConsumer>>
pub async fn get_frame(&self, index: usize) -> Result<Option<FrameConsumer>>
Block until the frame at the given index is available.
Returns None if the group is finished and the index is out of range.
Sourcepub async fn next_frame(&mut self) -> Result<Option<FrameConsumer>>
pub async fn next_frame(&mut self) -> Result<Option<FrameConsumer>>
Return a consumer for the next frame for chunked reading.
Trait Implementations§
Source§impl Clone for GroupConsumer
impl Clone for GroupConsumer
Source§fn clone(&self) -> GroupConsumer
fn clone(&self) -> GroupConsumer
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 GroupConsumer
impl RefUnwindSafe for GroupConsumer
impl Send for GroupConsumer
impl Sync for GroupConsumer
impl Unpin for GroupConsumer
impl UnsafeUnpin for GroupConsumer
impl UnwindSafe for GroupConsumer
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