pub struct Http2Builder { /* private fields */ }Expand description
Builder for a complete HTTP/2 connection sequence.
Optionally includes the client connection preface, followed by one or more frames.
§Example
use stackforge_core::layer::http2::builder::{Http2Builder, Http2FrameBuilder};
let bytes = Http2Builder::new()
.frame(Http2FrameBuilder::settings())
.frame(Http2FrameBuilder::settings_ack())
.build();Implementations§
Source§impl Http2Builder
impl Http2Builder
Sourcepub fn without_preface() -> Self
pub fn without_preface() -> Self
Create a builder without the connection preface.
Sourcepub fn frame(self, f: Http2FrameBuilder) -> Self
pub fn frame(self, f: Http2FrameBuilder) -> Self
Add a frame to the sequence.
Sourcepub fn header_size(&self) -> usize
pub fn header_size(&self) -> usize
Get the total byte size of the built output.
Trait Implementations§
Source§impl Clone for Http2Builder
impl Clone for Http2Builder
Source§fn clone(&self) -> Http2Builder
fn clone(&self) -> Http2Builder
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 moreSource§impl Debug for Http2Builder
impl Debug for Http2Builder
Auto Trait Implementations§
impl Freeze for Http2Builder
impl RefUnwindSafe for Http2Builder
impl Send for Http2Builder
impl Sync for Http2Builder
impl Unpin for Http2Builder
impl UnsafeUnpin for Http2Builder
impl UnwindSafe for Http2Builder
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