pub struct Session<S: Session> { /* private fields */ }Implementations§
Source§impl<S: Session> Session<S>
impl<S: Session> Session<S>
Sourcepub async fn connect(
session: S,
publish: impl Into<Option<OriginConsumer>>,
subscribe: impl Into<Option<OriginProducer>>,
) -> Result<Self, Error>
pub async fn connect( 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(
session: S,
publish: impl Into<Option<OriginConsumer>>,
subscribe: impl Into<Option<OriginProducer>>,
) -> Result<Self, Error>
pub async fn accept( 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<S> Freeze for Session<S>where
S: Freeze,
impl<S> RefUnwindSafe for Session<S>where
S: RefUnwindSafe,
impl<S> Send for Session<S>
impl<S> Sync for Session<S>
impl<S> Unpin for Session<S>where
S: Unpin,
impl<S> UnwindSafe for Session<S>where
S: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more