pub struct Request { /* private fields */ }
Expand description
A mostly complete WebTransport handshake, just awaiting the server’s decision on whether to accept or reject the session based on the URL.
Implementations§
Source§impl Request
impl Request
Sourcepub async fn ok(self) -> Result<Session, WriteError>
pub async fn ok(self) -> Result<Session, WriteError>
Accept the session, returning a 200 OK.
Sourcepub async fn close(self, status: StatusCode) -> Result<(), WriteError>
pub async fn close(self, status: StatusCode) -> Result<(), WriteError>
Reject the session, returing your favorite HTTP status code.
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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