Struct medea_jason::peer::receiver::State
source · pub struct State { /* private fields */ }
Expand description
State of the Component
.
Implementations§
source§impl State
impl State
sourcepub fn new(
id: TrackId,
mid: Option<String>,
media_type: MediaType,
media_direction: MediaDirection,
muted: bool,
sender: MemberId,
connection_mode: ConnectionMode
) -> Self
pub fn new( id: TrackId, mid: Option<String>, media_type: MediaType, media_direction: MediaDirection, muted: bool, sender: MemberId, connection_mode: ConnectionMode ) -> Self
Returns State
with a provided data.
sourcepub const fn media_type(&self) -> MediaType
pub const fn media_type(&self) -> MediaType
sourcepub fn enabled_individual(&self) -> bool
pub fn enabled_individual(&self) -> bool
Returns current individual media exchange state of this State
.
sourcepub fn enabled_general(&self) -> bool
pub fn enabled_general(&self) -> bool
Returns current general media exchange state of this State
.
sourcepub fn media_direction(&self) -> MediaDirection
pub fn media_direction(&self) -> MediaDirection
Returns the current general MediaDirection
of this State
.
sourcepub fn update(&self, track_patch: &TrackPatchEvent)
pub fn update(&self, track_patch: &TrackPatchEvent)
Updates this State
with the provided TrackPatchEvent
.
Trait Implementations§
source§impl AsProtoState for State
impl AsProtoState for State
§type Output = Receiver
type Output = Receiver
medea_client_api_proto::state
into which this state can be
transformed.source§fn as_proto(&self) -> Self::Output
fn as_proto(&self) -> Self::Output
Converts this state to the
medea_client_api_proto::state
representation.source§impl MediaStateControllable for State
impl MediaStateControllable for State
source§fn media_exchange_state_controller(&self) -> Rc<MediaExchangeStateController>
fn media_exchange_state_controller(&self) -> Rc<MediaExchangeStateController>
Returns reference to the
MediaExchangeStateController
.source§fn mute_state_controller(&self) -> Rc<MuteStateController>
fn mute_state_controller(&self) -> Rc<MuteStateController>
Returns a reference to the
MuteStateController
.source§fn media_exchange_state(&self) -> MediaExchangeState
fn media_exchange_state(&self) -> MediaExchangeState
Returns
MediaExchangeState
of this MediaStateControllable
.source§fn mute_state(&self) -> MuteState
fn mute_state(&self) -> MuteState
Returns
MuteState
of this MediaStateControllable
.source§fn media_state_transition_to(
&self,
desired_state: MediaState
) -> Result<(), Traced<ProhibitedStateError>>
fn media_state_transition_to( &self, desired_state: MediaState ) -> Result<(), Traced<ProhibitedStateError>>
source§fn is_subscription_needed(&self, desired_state: MediaState) -> bool
fn is_subscription_needed(&self, desired_state: MediaState) -> bool
Indicates whether
Room
should subscribe to the MediaState
update
when updating MediaStateControllable
to the provided MediaState
.source§fn is_track_patch_needed(&self, desired_state: MediaState) -> bool
fn is_track_patch_needed(&self, desired_state: MediaState) -> bool
Indicates whether
Room
should send TrackPatchCommand
to the
server when updating MediaStateControllable
to the provided
MediaState
.source§fn when_media_state_stable(
&self,
desired_state: MediaState
) -> LocalBoxFuture<'static, Result<(), MediaState>>
fn when_media_state_stable( &self, desired_state: MediaState ) -> LocalBoxFuture<'static, Result<(), MediaState>>
Returns
Future
which will be resolved when MediaState
of this
MediaStateControllable
will be TransitableState::Stable
or it’s
dropped. Read moresource§impl SynchronizableState for State
impl SynchronizableState for State
§type Input = Receiver
type Input = Receiver
medea_client_api_proto::state
by which this state can be updated.source§fn from_proto(input: Self::Input, _: &LocalTracksConstraints) -> Self
fn from_proto(input: Self::Input, _: &LocalTracksConstraints) -> Self
Creates a new state from the
medea_client_api_proto::state
representation.source§fn apply(&self, input: Self::Input, _: &LocalTracksConstraints)
fn apply(&self, input: Self::Input, _: &LocalTracksConstraints)
Updates this state with a provided
medea_client_api_proto::state
.source§impl TransceiverSide for State
impl TransceiverSide for State
source§fn source_kind(&self) -> MediaSourceKind
fn source_kind(&self) -> MediaSourceKind
Returns
MediaSourceKind
of this TransceiverSide
.source§fn is_transitable(&self) -> bool
fn is_transitable(&self) -> bool
Returns
true
if this TransceiverSide
currently can be
disabled/enabled without LocalTracksConstraints
updating.source§impl Updatable for State
impl Updatable for State
source§fn when_stabilized(&self) -> AllProcessed<'static>
fn when_stabilized(&self) -> AllProcessed<'static>
Returns Future
resolving once media_exchange_state
is
stabilized.
source§fn when_updated(&self) -> AllProcessed<'static>
fn when_updated(&self) -> AllProcessed<'static>
source§fn connection_lost(&self)
fn connection_lost(&self)
Notifies State
about a RPC connection loss.
source§fn connection_recovered(&self)
fn connection_recovered(&self)
Notifies State
about a RPC connection restore.
Auto Trait Implementations§
impl !RefUnwindSafe for State
impl !Send for State
impl !Sync for State
impl Unpin for State
impl !UnwindSafe for State
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