pub struct RequestResolver<C, B>{ /* private fields */ }Available on crate feature
h3 only.Expand description
Helper struct to await the request headers and return a Request object
Implementations§
Source§impl<C, B> RequestResolver<C, B>where
C: Connection<B>,
B: Buf,
impl<C, B> RequestResolver<C, B>where
C: Connection<B>,
B: Buf,
Sourcepub async fn resolve_request(
self,
) -> Result<(Request<()>, RequestStream<<C as OpenStreams<B>>::BidiStream, B>), StreamError>
pub async fn resolve_request( self, ) -> Result<(Request<()>, RequestStream<<C as OpenStreams<B>>::BidiStream, B>), StreamError>
Returns a future to await the request headers and return a Request object
Sourcepub fn accept_with_frame(
self,
frame: Result<Option<Frame<PayloadLen>>, FrameStreamError>,
) -> Result<ResolvedRequest<C, B>, StreamError>
pub fn accept_with_frame( self, frame: Result<Option<Frame<PayloadLen>>, FrameStreamError>, ) -> Result<ResolvedRequest<C, B>, StreamError>
Accepts a http request where the first frame has already been read and decoded.
This is needed as a bidirectional stream may be read as part of incoming webtransport
bi-streams. If it turns out that the stream is not a WEBTRANSPORT_STREAM the request
may still want to be handled and passed to the user.
Trait Implementations§
Source§impl<C, B> CloseStream for RequestResolver<C, B>where
C: Connection<B>,
B: Buf,
impl<C, B> CloseStream for RequestResolver<C, B>where
C: Connection<B>,
B: Buf,
Source§fn handle_connection_error_on_stream(
&mut self,
internal_error: InternalConnectionError,
) -> StreamError
fn handle_connection_error_on_stream( &mut self, internal_error: InternalConnectionError, ) -> StreamError
Handles a connection error on a stream
Source§fn handle_quic_stream_error(&self, error: StreamErrorIncoming) -> StreamError
fn handle_quic_stream_error(&self, error: StreamErrorIncoming) -> StreamError
Handles a incoming stream error from the quic layer
Source§fn check_peer_connection_closing(&self) -> Option<StreamError>
fn check_peer_connection_closing(&self) -> Option<StreamError>
Checks if the peer connection is closing an if it is allowed to send a request / server push
Source§impl<C, B> ConnectionState for RequestResolver<C, B>where
C: Connection<B>,
B: Buf,
impl<C, B> ConnectionState for RequestResolver<C, B>where
C: Connection<B>,
B: Buf,
Get the shared state
Source§fn get_conn_error(&self) -> Option<ErrorOrigin>
fn get_conn_error(&self) -> Option<ErrorOrigin>
Get the connection error if the connection is in error state because of another task Read more
Source§fn set_conn_error(&self, error: ErrorOrigin) -> ErrorOrigin
fn set_conn_error(&self, error: ErrorOrigin) -> ErrorOrigin
tries to set the connection error
Source§fn set_conn_error_and_wake<T>(&self, error: T) -> ErrorOriginwhere
T: Into<ErrorOrigin>,
fn set_conn_error_and_wake<T>(&self, error: T) -> ErrorOriginwhere
T: Into<ErrorOrigin>,
set the connection error and wake the connection
Source§fn set_closing(&self)
fn set_closing(&self)
Set the connection to closing
Source§fn is_closing(&self) -> bool
fn is_closing(&self) -> bool
Check if the connection is closing
Source§fn set_settings(&self, settings: Settings)
fn set_settings(&self, settings: Settings)
Set the settings
Source§fn waker(&self) -> &AtomicWaker
fn waker(&self) -> &AtomicWaker
Returns the waker for the connection
Auto Trait Implementations§
impl<C, B> Freeze for RequestResolver<C, B>
impl<C, B> !RefUnwindSafe for RequestResolver<C, B>
impl<C, B> Send for RequestResolver<C, B>
impl<C, B> Sync for RequestResolver<C, B>
impl<C, B> Unpin for RequestResolver<C, B>
impl<C, B> !UnwindSafe for RequestResolver<C, B>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more