#[non_exhaustive]pub enum Role {
Publisher,
Subscriber,
}Expand description
The session direction a client advertises in its SETUP (moq-lite-05+). The single direction a client intends to use the session for.
A client advertises this in its SETUP so the server can reject a token that lacks the matching scope during the handshake, instead of accepting a connection that then silently carries no media (a subscribe-only token used to publish, or vice versa). It only ever narrows what the server grants, so it is not a security boundary: the server still enforces the token’s scope regardless.
A session is bidirectional by default, which the wire says by omitting the
parameter. Option<Role> mirrors that: None is the default, and it’s also what
a client that predates the parameter decodes to.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Publisher
The client will publish tracks (ingest); the server must consume.
Subscriber
The client will subscribe to tracks (egress); the server must publish.
Implementations§
Trait Implementations§
impl Copy for Role
impl Eq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.