pub struct GroupProducer {
pub info: Group,
/* private fields */
}Expand description
Create a group, frame-by-frame.
Fields§
§info: GroupImplementations§
Source§impl GroupProducer
impl GroupProducer
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] or [Self::append]. 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 close(self)
pub fn abort(self, err: Error)
Sourcepub fn consume(&self) -> GroupConsumer
pub fn consume(&self) -> GroupConsumer
Create a new consumer for the group.
pub fn unused(&self) -> impl Future<Output = ()>
Trait Implementations§
Source§impl Clone for GroupProducer
impl Clone for GroupProducer
Source§fn clone(&self) -> GroupProducer
fn clone(&self) -> GroupProducer
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 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