pub struct RoomEffects(Option<Obligation<RoomEffectWork>>);Expand description
batches post-lock transport, signaling and policy side-effects for room state transitions
room state mutation (holds RoomState write lock)
- mutate in-memory graph
- return commit data
|
v drop RoomState write lock
RoomEffects::from(commit) -> execute
|
v step 1: transport execution
+-----------------------------------------------------------+
| - create/remove consumer routes on workers |
| - dispatch session teardowns |
+-----------------------------------------------------------+
|
v step 2: RoomOutputPlan pre-policy fanout
+-----------------------------------------------------------+
| - send track snapshots and presence user-info fanout |
+-----------------------------------------------------------+
|
v step 3: source policy turn
+-----------------------------------------------------------+
| - re-evaluate audio admission and video bandwidth solver |
| - commit packet gate and BWE target updates |
+-----------------------------------------------------------+
|
v step 4: RoomOutputPlan post-policy fanout
+-----------------------------------------------------------+
| - send user-info and lifecycle close/track/fanout output |
+-----------------------------------------------------------+Publication commits convert into PublicationEffects so their execution requires
the source-policy guard held since the state commit.
A nonempty batch retains its obligation until transport, policy and output
finish. Cancellation after transport still leaves the batch unfinished.
Tuple Fields§
§0: Option<Obligation<RoomEffectWork>>Implementations§
Trait Implementations§
Source§impl Debug for RoomEffects
impl Debug for RoomEffects
Source§impl Default for RoomEffects
impl Default for RoomEffects
Source§fn default() -> RoomEffects
fn default() -> RoomEffects
Returns the “default value” for a type. Read more
Source§impl From<ConnectionCloseCommit> for RoomEffects
impl From<ConnectionCloseCommit> for RoomEffects
Source§fn from(commit: ConnectionCloseCommit) -> Self
fn from(commit: ConnectionCloseCommit) -> Self
Converts to this type from the input type.
Source§impl From<DisconnectCommit> for RoomEffects
impl From<DisconnectCommit> for RoomEffects
Source§fn from(commit: DisconnectCommit) -> Self
fn from(commit: DisconnectCommit) -> Self
Converts to this type from the input type.
Source§impl From<JoinCommit> for RoomEffects
impl From<JoinCommit> for RoomEffects
Source§fn from(commit: JoinCommit) -> Self
fn from(commit: JoinCommit) -> Self
Converts to this type from the input type.
Source§impl From<PresenceCommit> for RoomEffects
impl From<PresenceCommit> for RoomEffects
Source§fn from(commit: PresenceCommit) -> Self
fn from(commit: PresenceCommit) -> Self
Converts to this type from the input type.
Source§impl From<ReceiverRouteCommit> for RoomEffects
impl From<ReceiverRouteCommit> for RoomEffects
Source§fn from(commit: ReceiverRouteCommit) -> Self
fn from(commit: ReceiverRouteCommit) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RoomEffects
impl RefUnwindSafe for RoomEffects
impl Send for RoomEffects
impl Sync for RoomEffects
impl Unpin for RoomEffects
impl UnsafeUnpin for RoomEffects
impl UnwindSafe for RoomEffects
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