pub struct GroupProducer {
pub info: Group,
/* private fields */
}Expand description
Create a group, frame-by-frame.
Fields§
§info: GroupImplementations§
Source§impl GroupProducer
impl GroupProducer
pub fn new(info: Group) -> Self
Sourcepub fn write_frame<B: Into<Bytes>>(&mut self, frame: B)
pub fn write_frame<B: Into<Bytes>>(&mut self, frame: B)
A helper method to write a frame from a single byte buffer.
If you want to write multiple chunks, use Self::create_frame or Self::append_frame. But an upfront size is required.
Sourcepub fn create_frame(&mut self, info: Frame) -> FrameProducer
pub fn create_frame(&mut self, info: Frame) -> FrameProducer
Create a frame with an upfront size
Sourcepub fn append_frame(&mut self, consumer: FrameConsumer)
pub fn append_frame(&mut self, consumer: FrameConsumer)
Append a frame to the group.
pub fn finish(&mut self)
pub fn abort(&mut self, err: Error)
Sourcepub fn consume(&self) -> GroupConsumer
pub fn consume(&self) -> GroupConsumer
Create a new consumer for the group.
pub async fn unused(&self)
Trait Implementations§
Source§impl Clone for GroupProducer
impl Clone for GroupProducer
Source§fn clone(&self) -> GroupProducer
fn clone(&self) -> GroupProducer
Returns a copy 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 GroupProducer
impl RefUnwindSafe for GroupProducer
impl Send for GroupProducer
impl Sync for GroupProducer
impl Unpin for GroupProducer
impl UnwindSafe for GroupProducer
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