pub struct Builder { /* private fields */ }
Expand description
A builder to configure an HTTP connection.
After setting options, the builder is used to create a Handshake
future.
Implementations
sourceimpl Builder
impl Builder
sourcepub fn executor<E>(&mut self, exec: E) -> &mut Builder where
E: Executor<Box<dyn Future<Item = (), Error = ()> + Send>> + Send + Sync + 'static,
pub fn executor<E>(&mut self, exec: E) -> &mut Builder where
E: Executor<Box<dyn Future<Item = (), Error = ()> + Send>> + Send + Sync + 'static,
Provide an executor to execute background HTTP2 tasks.
sourcepub fn http2_only(&mut self, enabled: bool) -> &mut Builder
pub fn http2_only(&mut self, enabled: bool) -> &mut Builder
Sets whether HTTP2 is required.
Default is false.
sourcepub fn http2_initial_stream_window_size(
&mut self,
sz: impl Into<Option<u32>>
) -> &mut Self
pub fn http2_initial_stream_window_size(
&mut self,
sz: impl Into<Option<u32>>
) -> &mut Self
Sets the SETTINGS_INITIAL_WINDOW_SIZE
option for HTTP2
stream-level flow control.
Default is 65,535
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more