pub struct RequestResolver<C, B>{ /* private fields */ }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::BidiStream, B>), StreamError>
pub async fn resolve_request( self, ) -> Result<(Request<()>, RequestStream<C::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.
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