pub struct Request<S: Session> { /* private fields */ }Expand description
A paused server-side handshake.
Returned by Server::accept_request once the client’s advertised
path is known but before the session is granted anything. Set the
origins to serve, then call ok to complete the handshake, or
close to reject it. Modeled on the WebTransport Request.
Implementations§
Source§impl<S: Session> Request<S>
impl<S: Session> Request<S>
Sourcepub fn path(&self) -> Option<&str>
pub fn path(&self) -> Option<&str>
The request path the client advertised in its SETUP, if any.
Populated for moq-lite-05; None on versions without an in-band request path.
See the note on Server::accept_request.
Sourcepub fn with_publish(self, publish: impl Into<Option<OriginConsumer>>) -> Self
pub fn with_publish(self, publish: impl Into<Option<OriginConsumer>>) -> Self
Sourcepub fn with_consume(self, consume: impl Into<Option<OriginProducer>>) -> Self
pub fn with_consume(self, consume: impl Into<Option<OriginProducer>>) -> Self
Subscribe to the connected client. Overrides any value from the Server builder.
Sourcepub fn with_stats(self, stats: StatsHandle) -> Self
pub fn with_stats(self, stats: StatsHandle) -> Self
Set the tier-scoped stats handle. Overrides any value from the Server builder.
Auto Trait Implementations§
impl<S> Freeze for Request<S>
impl<S> RefUnwindSafe for Request<S>where
S: RefUnwindSafe,
<S as Session>::RecvStream: RefUnwindSafe,
<S as Session>::SendStream: RefUnwindSafe,
impl<S> Send for Request<S>
impl<S> Sync for Request<S>
impl<S> Unpin for Request<S>
impl<S> UnsafeUnpin for Request<S>where
S: UnsafeUnpin,
<S as Session>::RecvStream: UnsafeUnpin,
<S as Session>::SendStream: UnsafeUnpin,
impl<S> UnwindSafe for Request<S>where
S: UnwindSafe,
<S as Session>::RecvStream: UnwindSafe,
<S as Session>::SendStream: UnwindSafe,
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