pub struct Request { /* private fields */ }Expand description
A mostly complete WebTransport handshake awaiting server accept/reject based on URL.
Implementations§
Source§impl Request
impl Request
Sourcepub async fn accept(conn: Connection) -> Result<Self, ServerError>
pub async fn accept(conn: Connection) -> Result<Self, ServerError>
Accept a new WebTransport session from a client.
Sourcepub async fn ok(self) -> Result<Session, ServerError>
pub async fn ok(self) -> Result<Session, ServerError>
Accept the session and return a 200 OK response.
Sourcepub async fn close(self, status: StatusCode) -> Result<(), ServerError>
pub async fn close(self, status: StatusCode) -> Result<(), ServerError>
Reject the session and return the provided HTTP status code.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin 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