pub struct Session {
pub webtransport: Session,
}Expand description
A MoQ session, constructed with [Publisher] and [Subscriber] halves.
This simplifies the state machine and immediately rejects any subscriptions that don’t match the origin prefix. You probably want to use Session unless you’re writing a relay.
Fields§
§webtransport: SessionImplementations§
Source§impl Session
impl Session
Sourcepub async fn connect<T: Into<Session>, P: Into<Option<OriginConsumer>>, C: Into<Option<OriginProducer>>>(
session: T,
publish: P,
subscribe: C,
) -> Result<Self, Error>
pub async fn connect<T: Into<Session>, P: Into<Option<OriginConsumer>>, C: Into<Option<OriginProducer>>>( session: T, publish: P, subscribe: C, ) -> Result<Self, Error>
Perform the MoQ handshake as a client.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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