pub struct Session { /* private fields */ }Implementations§
Source§impl Session
impl Session
Sourcepub async fn connect<S: Session>(
session: S,
publish: impl Into<Option<OriginConsumer>>,
subscribe: impl Into<Option<OriginProducer>>,
) -> Result<Self, Error>
pub async fn connect<S: Session>( session: S, publish: impl Into<Option<OriginConsumer>>, subscribe: impl Into<Option<OriginProducer>>, ) -> Result<Self, Error>
Perform the MoQ handshake as a client, negotiating the version.
Publishing is performed with OriginConsumer and subscribing with OriginProducer. The connection remains active until the session is closed.
Sourcepub async fn accept<S: Session>(
session: S,
publish: impl Into<Option<OriginConsumer>>,
subscribe: impl Into<Option<OriginProducer>>,
) -> Result<Self, Error>
pub async fn accept<S: Session>( session: S, publish: impl Into<Option<OriginConsumer>>, subscribe: impl Into<Option<OriginProducer>>, ) -> Result<Self, Error>
Perform the MoQ handshake as a server.
Publishing is performed with OriginConsumer and subscribing with OriginProducer. The connection remains active until the session is closed.
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