pub struct Session {
pub webtransport: Session,
}Expand description
A MoQ session, constructed with OriginProducer and OriginConsumer 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(
session: impl Into<Session>,
publish: impl Into<Option<OriginConsumer>>,
subscribe: impl Into<Option<OriginProducer>>,
) -> Result<Self, Error>
pub async fn connect( session: impl Into<Session>, publish: impl Into<Option<OriginConsumer>>, subscribe: impl Into<Option<OriginProducer>>, ) -> Result<Self, Error>
Perform the MoQ handshake as a client.
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