Enum Command

Source
pub enum Command {
    JoinRoom {
        member_id: MemberId,
        credential: Credential,
        capabilities: Capabilities,
    },
    LeaveRoom {
        member_id: MemberId,
    },
    MakeSdpOffer {
        peer_id: PeerId,
        sdp_offer: String,
        mids: HashMap<TrackId, String>,
        transceivers_statuses: HashMap<TrackId, bool>,
    },
    MakeSdpAnswer {
        peer_id: PeerId,
        sdp_answer: String,
        transceivers_statuses: HashMap<TrackId, bool>,
    },
    SetIceCandidate {
        peer_id: PeerId,
        candidate: IceCandidate,
    },
    AddPeerConnectionMetrics {
        peer_id: PeerId,
        metrics: PeerMetrics,
    },
    UpdateTracks {
        peer_id: PeerId,
        tracks_patches: Vec<TrackPatchCommand>,
    },
    SynchronizeMe {
        state: Room,
    },
}
Expand description

Possible commands sent by Web Client to Media Server.

Variants§

§

JoinRoom

Request to join a Room.

Fields

§member_id: MemberId

ID of the Member who joins the Room.

§credential: Credential

Credential of the Member to authenticate with.

§capabilities: Capabilities

Capabilities reported by Web Client (e.g. available codecs, platform).

§

LeaveRoom

Request to leave a Room.

Fields

§member_id: MemberId

ID of the Member who leaves the Room.

§

MakeSdpOffer

Web Client sends SDP Offer.

Fields

§peer_id: PeerId

ID of the Peer SDP Offer is sent for.

§sdp_offer: String

SDP Offer of the Peer.

§mids: HashMap<TrackId, String>

Associations between Track and transceiver’s media description.

mid is basically an ID of m=<media> section in SDP.

§transceivers_statuses: HashMap<TrackId, bool>

Statuses of the Peer transceivers.

§

MakeSdpAnswer

Web Client sends SDP Answer.

Fields

§peer_id: PeerId

ID of the Peer SDP Answer is sent for.

§sdp_answer: String

SDP Answer of the Peer.

§transceivers_statuses: HashMap<TrackId, bool>

Statuses of the Peer transceivers.

§

SetIceCandidate

Web Client sends an Ice Candidate.

Fields

§peer_id: PeerId

ID of the Peer the Ice Candidate is sent for.

§candidate: IceCandidate

IceCandidate sent by the Peer.

§

AddPeerConnectionMetrics

Web Client sends Peer Connection metrics.

Fields

§peer_id: PeerId

ID of the Peer metrics are sent for.

§metrics: PeerMetrics

Metrics of the Peer.

§

UpdateTracks

Web Client asks permission to update Tracks in the specified Peer. Media Server gives permission by sending Event::PeerUpdated.

Fields

§peer_id: PeerId

ID of the Peer to update Tracks in.

§tracks_patches: Vec<TrackPatchCommand>

Patches for updating the Tracks.

§

SynchronizeMe

Web Client asks Media Server to synchronize Client State with a Server State.

Fields

§state: Room

Whole Client State of the Room.

Implementations§

Source§

impl Command

Source

pub fn dispatch_with<T: CommandHandler>( self, handler: &mut T, ) -> <T as CommandHandler>::Output

Dispatches Command with given CommandHandler.

Trait Implementations§

Source§

impl Clone for Command

Source§

fn clone(&self) -> Command

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Command

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Command

Source§

fn eq(&self, other: &Command) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Command

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Command

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,