pub struct ConnectionHandle(/* private fields */);Expand description
External handler to a Connection with a remote Member.
Actually, represents a Weak-based handle to InnerConnection.
Implementations§
Source§impl ConnectionHandle
impl ConnectionHandle
Sourcepub fn on_close(
&self,
f: Function<()>,
) -> Result<(), Traced<HandleDetachedError>>
pub fn on_close( &self, f: Function<()>, ) -> Result<(), Traced<HandleDetachedError>>
Sets callback, invoked when this Connection will close.
§Errors
See HandleDetachedError for details.
Sourcepub fn get_remote_member_id(
&self,
) -> Result<String, Traced<HandleDetachedError>>
pub fn get_remote_member_id( &self, ) -> Result<String, Traced<HandleDetachedError>>
Sourcepub fn on_remote_track_added(
&self,
f: Function<RemoteMediaTrack>,
) -> Result<(), Traced<HandleDetachedError>>
pub fn on_remote_track_added( &self, f: Function<RemoteMediaTrack>, ) -> Result<(), Traced<HandleDetachedError>>
Sets callback, invoked when a new remote::Track is added to this
Connection.
§Errors
See HandleDetachedError for details.
Sourcepub fn on_quality_score_update(
&self,
f: Function<u8>,
) -> Result<(), Traced<HandleDetachedError>>
pub fn on_quality_score_update( &self, f: Function<u8>, ) -> Result<(), Traced<HandleDetachedError>>
Sets callback, invoked when a connection quality score is updated by a server.
§Errors
See HandleDetachedError for details.
Sourcepub fn enable_remote_video(
&self,
source_kind: Option<MediaSourceKind>,
) -> impl Future<Output = Result<(), Traced<ChangeMediaStateError>>> + 'static + use<>
pub fn enable_remote_video( &self, source_kind: Option<MediaSourceKind>, ) -> impl Future<Output = Result<(), Traced<ChangeMediaStateError>>> + 'static + use<>
Enables inbound video in this Connection.
§Errors
With ChangeMediaStateError::Detached if an inner Weak pointer
upgrade fails.
With ChangeMediaStateError::TransitionIntoOppositeState if
ConnectionHandle::disable_remote_video() was called while enabling
or a media server didn’t approve this state transition.
Sourcepub fn disable_remote_video(
&self,
source_kind: Option<MediaSourceKind>,
) -> impl Future<Output = Result<(), Traced<ChangeMediaStateError>>> + 'static + use<>
pub fn disable_remote_video( &self, source_kind: Option<MediaSourceKind>, ) -> impl Future<Output = Result<(), Traced<ChangeMediaStateError>>> + 'static + use<>
Disables inbound video in this Connection.
§Errors
With ChangeMediaStateError::Detached if an inner Weak pointer
upgrade fails.
With ChangeMediaStateError::TransitionIntoOppositeState if
ConnectionHandle::enable_remote_video() was called while disabling
or a media server didn’t approve this state transition.
Sourcepub fn enable_remote_audio(
&self,
) -> impl Future<Output = Result<(), Traced<ChangeMediaStateError>>> + 'static + use<>
pub fn enable_remote_audio( &self, ) -> impl Future<Output = Result<(), Traced<ChangeMediaStateError>>> + 'static + use<>
Enables inbound audio in this Connection.
§Errors
With ChangeMediaStateError::Detached if an inner Weak pointer
upgrade fails.
With ChangeMediaStateError::TransitionIntoOppositeState if
ConnectionHandle::disable_remote_audio() was called while enabling
or a media server didn’t approve this state transition.
Sourcepub fn disable_remote_audio(
&self,
) -> impl Future<Output = Result<(), Traced<ChangeMediaStateError>>> + 'static + use<>
pub fn disable_remote_audio( &self, ) -> impl Future<Output = Result<(), Traced<ChangeMediaStateError>>> + 'static + use<>
Disables inbound audio in this Connection.
§Errors
With ChangeMediaStateError::Detached if an inner Weak pointer
upgrade fails.
With ChangeMediaStateError::TransitionIntoOppositeState if
ConnectionHandle::enable_remote_audio() was called while disabling
or a media server didn’t approve this state transition.
Trait Implementations§
Source§impl Clone for ConnectionHandle
impl Clone for ConnectionHandle
Source§fn clone(&self) -> ConnectionHandle
fn clone(&self) -> ConnectionHandle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more