pub(crate) struct RoomPacketSinkRegistry {
any_active: AtomicBool,
generation: AtomicU64,
active_rooms: RwLock<HashMap<RoomInstanceId, RegisteredPacketSink>>,
}Fields§
§any_active: AtomicBool§generation: AtomicU64§active_rooms: RwLock<HashMap<RoomInstanceId, RegisteredPacketSink>>Implementations§
Source§impl RoomPacketSinkRegistry
impl RoomPacketSinkRegistry
pub fn sink_for_room( &self, room_instance_id: RoomInstanceId, ) -> Option<RegisteredPacketSink>
Sourcepub fn register_room(
&self,
room_instance_id: RoomInstanceId,
sink: Arc<dyn PacketSink>,
forward_destination_kind: RtpForwardDestinationKind,
)
pub fn register_room( &self, room_instance_id: RoomInstanceId, sink: Arc<dyn PacketSink>, forward_destination_kind: RtpForwardDestinationKind, )
Registers sink for room_instance_id, replacing the current entry.
Previously cloned RegisteredPacketSink handles are not revoked.
Sourcepub fn unregister_room(&self, room_instance_id: RoomInstanceId)
pub fn unregister_room(&self, room_instance_id: RoomInstanceId)
Removes the current entry for room_instance_id.
Cached or cloned sink handles may still receive packets after
unregister_room returns.
Trait Implementations§
Source§impl Debug for RoomPacketSinkRegistry
impl Debug for RoomPacketSinkRegistry
Source§impl Default for RoomPacketSinkRegistry
impl Default for RoomPacketSinkRegistry
Source§fn default() -> RoomPacketSinkRegistry
fn default() -> RoomPacketSinkRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for RoomPacketSinkRegistry
impl RefUnwindSafe for RoomPacketSinkRegistry
impl Send for RoomPacketSinkRegistry
impl Sync for RoomPacketSinkRegistry
impl Unpin for RoomPacketSinkRegistry
impl UnsafeUnpin for RoomPacketSinkRegistry
impl UnwindSafe for RoomPacketSinkRegistry
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more