Struct medea_jason::peer::sender::Sender[][src]

pub struct Sender { /* fields omitted */ }

Representation of a local::Track that is being sent to some remote peer.

Implementations

impl Sender[src]

pub fn new(
    state: &State,
    media_connections: &MediaConnections,
    send_constraints: LocalTracksConstraints,
    track_events_sender: UnboundedSender<TrackEvent>
) -> Result<Rc<Self>, Traced<MediaConnectionsError>>
[src]

Creates new Transceiver if provided mid is None, otherwise retrieves existing Transceiver via provided mid from a provided MediaConnections. Errors if Transceiver lookup fails.

Errors

Errors with MediaConnectionsError::TransceiverNotFound if State has Some mid, but this mid isn’t found in the MediaConnections.

pub fn caps(&self) -> &TrackConstraints[src]

Returns TrackConstraints of this Sender.

#[must_use]pub fn is_publishing(&self) -> bool[src]

Indicates whether this Sender is publishing media traffic.

pub async fn remove_track(&self)[src]

Drops local::Track used by this Sender. Sets track used by sending side of inner transceiver to None.

Panics

If replaceTrack() call fails. This might happen if an underlying RTCRtpSender is stopped. replaceTrack() with null track should never fail for any other reason.

#[must_use]pub fn has_track(&self) -> bool[src]

Indicates whether this Sender has local::Track.

#[must_use]pub fn transceiver(&self) -> Transceiver[src]

Returns Transceiver of this Sender.

#[must_use]pub fn mid(&self) -> Option<String>[src]

Returns mid of this Sender.

pub fn send_media_exchange_state_intention(&self, state: Transition)[src]

pub fn send_mute_state_intention(&self, state: Transition)[src]

Trait Implementations

impl Drop for Sender[src]

Auto Trait Implementations

impl !RefUnwindSafe for Sender

impl !Send for Sender

impl !Sync for Sender

impl Unpin for Sender

impl !UnwindSafe for Sender

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<E> WrapTraced<E> for E[src]