pub struct Connection<T, B, E>where
T: Read + Write + Unpin,
B: Body + 'static,
E: Http2ClientConnExec<B, T> + Unpin,
B::Error: Into<Box<dyn Error + Send + Sync>>,{
inner: (PhantomData<T>, ClientTask<B, E, T>),
}Expand description
A future that processes all HTTP state for the IO object.
In most cases, this should just be spawned into an executor, so that it can process incoming and outgoing messages, notice hangups, and the like.
Instances of this type are typically created via the handshake function
Fields§
§inner: (PhantomData<T>, ClientTask<B, E, T>)Implementations§
Source§impl<T, B, E> Connection<T, B, E>
impl<T, B, E> Connection<T, B, E>
Sourcepub fn is_extended_connect_protocol_enabled(&self) -> bool
pub fn is_extended_connect_protocol_enabled(&self) -> bool
Returns whether the extended CONNECT protocol is enabled or not.
This setting is configured by the server peer by sending the
SETTINGS_ENABLE_CONNECT_PROTOCOL parameter in a SETTINGS frame.
This method returns the currently acknowledged value received from the
remote.
Sourcepub fn current_max_send_streams(&self) -> usize
pub fn current_max_send_streams(&self) -> usize
Returns the current maximum send stream count.
This setting is configured in a SETTINGS_MAX_CONCURRENT_STREAMS parameter in a SETTINGS frame,
and may change throughout the connection lifetime.
Sourcepub fn current_max_recv_streams(&self) -> usize
pub fn current_max_recv_streams(&self) -> usize
Returns the current maximum receive stream count.
This setting is configured in a SETTINGS_MAX_CONCURRENT_STREAMS parameter in a SETTINGS frame,
and may change throughout the connection lifetime.
Trait Implementations§
Source§impl<T, B, E> Debug for Connection<T, B, E>
impl<T, B, E> Debug for Connection<T, B, E>
Source§impl<T, B, E> Future for Connection<T, B, E>
impl<T, B, E> Future for Connection<T, B, E>
Auto Trait Implementations§
impl<T, B, E> Freeze for Connection<T, B, E>
impl<T, B, E> !RefUnwindSafe for Connection<T, B, E>
impl<T, B, E> Send for Connection<T, B, E>
impl<T, B, E> Sync for Connection<T, B, E>
impl<T, B, E> Unpin for Connection<T, B, E>
impl<T, B, E> !UnwindSafe for Connection<T, B, E>
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_cancellation_token(
self,
cancellation_token: &CancellationToken,
) -> WithCancellationTokenFuture<'_, Self>where
Self: Sized,
fn with_cancellation_token(
self,
cancellation_token: &CancellationToken,
) -> WithCancellationTokenFuture<'_, Self>where
Self: Sized,
CancellationToken::run_until_cancelled,
but with the advantage that it is easier to write fluent call chains. Read moreSource§fn with_cancellation_token_owned(
self,
cancellation_token: CancellationToken,
) -> WithCancellationTokenFutureOwned<Self>where
Self: Sized,
fn with_cancellation_token_owned(
self,
cancellation_token: CancellationToken,
) -> WithCancellationTokenFutureOwned<Self>where
Self: Sized,
CancellationToken::run_until_cancelled_owned,
but with the advantage that it is easier to write fluent call chains. Read more