pub struct SfuCore {
media_transport: MediaTransport,
rooms: Arc<RoomManager>,
}Expand description
A cloneable core handle that admits users into room-bound MediaSessions.
Fields§
§media_transport: MediaTransport§rooms: Arc<RoomManager>Implementations§
Source§impl SfuCore
impl SfuCore
pub fn new(media_transport: MediaTransport, rooms: Arc<RoomManager>) -> SfuCore
Sourcepub async fn admit_user(
&self,
room_id: &str,
request: JoinUserRequest,
) -> Result<MediaSession, RoomManagerJoinError>
pub async fn admit_user( &self, room_id: &str, request: JoinUserRequest, ) -> Result<MediaSession, RoomManagerJoinError>
Admits one room user and returns its connection-owning media session.
An existing request.user_id replaces its current connection.
Replacement room and transport effects finish before return.
This future is not cancellation safe. Once polled, await it to completion.
Dropping it after membership commits can leave room or replacement
transport effects unfinished.
§Errors
Returns RoomManagerJoinError::MissingRoom when room_id is not
current. Returns RoomManagerJoinError::RoomFull when a new user
exceeds room capacity. Returns RoomManagerJoinError::NoUsableWorker
when no configured worker is usable. Returns RoomManagerJoinError::RouterState
when router placement cannot commit.
§Panics
Panics when existing relay state refers to an uncommitted source placement.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SfuCore
impl !RefUnwindSafe for SfuCore
impl Send for SfuCore
impl Sync for SfuCore
impl Unpin for SfuCore
impl UnsafeUnpin for SfuCore
impl !UnwindSafe for SfuCore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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>
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