pub struct Request { /* private fields */ }Expand description
An incoming MoQ session that can be accepted or rejected.
Self::with_publish and Self::with_consume will configure what will be published and consumed from the session respectively. Otherwise, the Server’s configuration is used by default.
Implementations§
Source§impl Request
impl Request
Sourcepub async fn close(self, _code: u16) -> Result<()>
pub async fn close(self, _code: u16) -> Result<()>
Reject the session, returning your favorite HTTP status code.
Sourcepub fn with_publish(self, publish: impl Into<Option<OriginConsumer>>) -> Self
pub fn with_publish(self, publish: impl Into<Option<OriginConsumer>>) -> Self
Publish the given origin to the session.
Sourcepub fn with_consume(self, consume: impl Into<Option<OriginProducer>>) -> Self
pub fn with_consume(self, consume: impl Into<Option<OriginProducer>>) -> Self
Consume the given origin from the session.
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