pub struct Room {
pub(super) definition: RoomDefinition,
pub(super) metrics: Arc<RuntimeMetrics>,
pub(super) source_policy_turn: Mutex<()>,
pub(super) state: RwLock<RoomState>,
}Fields§
§definition: RoomDefinition§metrics: Arc<RuntimeMetrics>§source_policy_turn: Mutex<()>§state: RwLock<RoomState>Implementations§
Source§impl Room
impl Room
pub fn uuid(&self) -> &str
pub fn issuer(&self) -> &str
pub fn key(&self) -> &str
pub async fn recording_state(&self) -> RecordingState
pub fn web_rtc_enabled(&self) -> bool
Sourcepub async fn transport_user_key(
&self,
user_id: &UserId,
connection_id: ConnectionId,
) -> TransportSessionKey
pub async fn transport_user_key( &self, user_id: &UserId, connection_id: ConnectionId, ) -> TransportSessionKey
Returns the transport key for an exact committed router placement.
§Panics
Panics when user_id and connection_id have no committed router
placement.
pub fn room_worker_policy(&self) -> RoomWorkerPolicy
Source§impl Room
impl Room
Sourcepub async fn remove_user_with_teardown(
&self,
user_id: &UserId,
connection_id: ConnectionId,
context: RoomEffectContext<'_>,
) -> bool
pub async fn remove_user_with_teardown( &self, user_id: &UserId, connection_id: ConnectionId, context: RoomEffectContext<'_>, ) -> bool
Returns true only when connection_id was current. A stale committed
placement may still be retired before returning false.
§Panics
Panics when detached relay state refers to an uncommitted source placement.
Sourcepub async fn disconnect_users_with_teardown(
&self,
user_ids: &[UserId],
context: RoomEffectContext<'_>,
)
pub async fn disconnect_users_with_teardown( &self, user_ids: &[UserId], context: RoomEffectContext<'_>, )
Removes current sessions in one state commit and ignores missing users.
§Panics
Panics if a current room user has no committed router placement or detached relay state refers to an uncommitted source placement.
Source§impl Room
impl Room
pub async fn diagnostics_overview_capture(&self) -> RoomOverviewCapture
pub async fn diagnostics_users_capture(&self) -> RoomUsersCapture
pub async fn diagnostics_detail_capture(&self) -> RoomDetailCapture
pub async fn diagnostics_user_capture( &self, user_key: &str, ) -> Option<RoomUserCapture>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Room
impl !RefUnwindSafe for Room
impl Send for Room
impl Sync for Room
impl Unpin for Room
impl UnsafeUnpin for Room
impl UnwindSafe for Room
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