pub struct User {
remote_address: Arc<str>,
media: ServerMediaNegotiation,
cleanup_finished: bool,
}Fields§
§remote_address: Arc<str>§media: ServerMediaNegotiation§cleanup_finished: boolImplementations§
Source§impl User
impl User
pub async fn apply_client_envelope( &mut self, envelope: ClientEnvelope, ) -> Result<Vec<ServerEnvelope>, UserError>
async fn update_info( &self, info: UserInfo, ) -> Result<Vec<ServerEnvelope>, UserError>
async fn broadcast( &self, message: JsonPayload, ) -> Result<Vec<ServerEnvelope>, UserError>
async fn start_recording( &self, request_id: RequestId, options: RecordingOptions, ) -> Vec<ServerEnvelope>
async fn stop_recording(&self, request_id: RequestId) -> Vec<ServerEnvelope>
Source§impl User
impl User
pub fn new(session: MediaSession, remote_address: Arc<str>) -> Self
pub(crate) fn room_id(&self) -> &str
pub(crate) const fn connection_id(&self) -> ConnectionId
pub(crate) fn user_id(&self) -> &UserId
pub(crate) fn remote_address(&self) -> &str
pub(crate) async fn is_current_connection(&self) -> bool
pub fn transport_disconnected(&self) -> bool
pub async fn start(&mut self) -> Result<Vec<ServerEnvelope>, UserError>
pub async fn close(&mut self)
pub(super) async fn reject_stale_connection(&self) -> Result<(), UserError>
Source§impl User
impl User
pub(super) async fn complete_negotiation( &mut self, response_to: RequestId, response: ClientResponse, ) -> Result<Vec<ServerEnvelope>, UserError>
pub(super) async fn renegotiate( &mut self, ) -> Result<Vec<ServerEnvelope>, UserError>
pub(super) async fn set_publication_active( &mut self, stream_type: StreamType, active: bool, ) -> Result<Vec<ServerEnvelope>, UserError>
pub(super) async fn subscribe( &self, target_user_id: UserId, states: DownloadStates, ) -> Result<Vec<ServerEnvelope>, UserError>
pub(super) async fn run_initial_offer( &mut self, ) -> Result<Vec<ServerEnvelope>, UserError>
Source§impl User
impl User
fn answer_error(&self, error: AnswerError) -> UserError
fn negotiation_error( &self, kind: NegotiationKind, response_to: Option<&RequestId>, error: SessionError, ) -> UserError
fn publish_error( &self, stream_type: StreamType, error: SessionError, ) -> UserError
fn subscribe_error( &self, target_user_id: &UserId, error: SessionError, ) -> UserError
Source§impl User
impl User
pub(crate) async fn apply_room_outbound( &mut self, outbound: UserOutbound, ) -> Result<Vec<ServerEnvelope>, UserError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for User
impl !RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnsafeUnpin for User
impl !UnwindSafe for User
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