pub struct Connections { /* private fields */ }Expand description
Service which manages Connections with remote Members.
Implementations§
Source§impl Connections
impl Connections
Sourcepub fn new(room_recv_constraints: Rc<RecvConstraints>) -> Self
pub fn new(room_recv_constraints: Rc<RecvConstraints>) -> Self
Creates new Connections.
Sourcepub fn on_new_connection(&self, f: Function<ConnectionHandle>)
pub fn on_new_connection(&self, f: Function<ConnectionHandle>)
Sets callback, which will be invoked when new Connection is
established.
Sourcepub fn update_connections(
&self,
track_id: &TrackId,
partner_members: HashSet<MemberId>,
) -> Vec<Connection>
pub fn update_connections( &self, track_id: &TrackId, partner_members: HashSet<MemberId>, ) -> Vec<Connection>
Adds or updates information about related Tracks with the provided
TrackId and MemberIds. Then Connections decides to create or
to delete Connections.
Returns Connections associated with the provided MemberIds.
Sourcepub fn remove_track(&self, track_id: &TrackId)
pub fn remove_track(&self, track_id: &TrackId)
Removes information about Track with the provided TrackId. Then
Connections can decide to delete the related Connection.
Sourcepub fn get(&self, remote_member_id: &MemberId) -> Option<Connection>
pub fn get(&self, remote_member_id: &MemberId) -> Option<Connection>
Lookups a Connection by the provided remote MemberId.
Sourcepub fn iter_by_track(
&self,
track_id: &TrackId,
) -> impl Iterator<Item = Connection> + use<'_>
pub fn iter_by_track( &self, track_id: &TrackId, ) -> impl Iterator<Item = Connection> + use<'_>
Iterates over all the Connections of the provided TrackId.
Sourcepub fn apply(&self, new_state: &Room)
pub fn apply(&self, new_state: &Room)
Updates this Connection with the provided proto::state::Room.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Connections
impl !RefUnwindSafe for Connections
impl !Send for Connections
impl !Sync for Connections
impl Unpin for Connections
impl !UnwindSafe for Connections
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