struct AuthenticatedSession {
_proof: WebSocketAuth,
writer: SplitSink<WebSocket, Message>,
reader: SplitStream<WebSocket>,
outbound: UserOutboundReceiver,
user: User,
user_config: UserConfig,
metrics: Arc<RuntimeMetrics>,
shutdown: CancellationToken,
}Fields§
§_proof: WebSocketAuth§writer: SplitSink<WebSocket, Message>§reader: SplitStream<WebSocket>§outbound: UserOutboundReceiver§user: User§user_config: UserConfig§metrics: Arc<RuntimeMetrics>§shutdown: CancellationTokenImplementations§
Source§impl AuthenticatedSession
impl AuthenticatedSession
async fn serve(self)
fn record_current_span(&self)
async fn start(self) -> Option<Self>
async fn start_inner(&mut self) -> Result<(), SessionExit>
async fn finish(&mut self, exit: SessionExit)
fn shutdown_exit(&self) -> Option<SessionExit>
Sourceasync fn run_loop(&mut self) -> SessionExit
async fn run_loop(&mut self) -> SessionExit
Checks transport health before each ping so RTC teardown closes idle sessions.
fn check_transport(&self) -> Option<SessionExit>
async fn handle_socket_event( &mut self, message: Option<Result<Message, AxumError>>, pong: &mut Option<Instant>, ) -> Option<SessionExit>
async fn handle_frame( &mut self, message: Message, pong: &mut Option<Instant>, ) -> Option<SessionExit>
async fn handle_binary(&mut self, payload: &[u8]) -> Option<SessionExit>
async fn handle_text(&mut self, payload: &str) -> Option<SessionExit>
async fn client_error(&self, fallback_code: CloseCode) -> SessionExit
async fn handle_outbound_event( &mut self, outbound: UserOutboundEvent, ) -> Option<SessionExit>
fn outbound_error(&self, code: CloseCode, log_send_failure: bool) -> SessionExit
Auto Trait Implementations§
impl !Freeze for AuthenticatedSession
impl !RefUnwindSafe for AuthenticatedSession
impl Send for AuthenticatedSession
impl Sync for AuthenticatedSession
impl Unpin for AuthenticatedSession
impl UnsafeUnpin for AuthenticatedSession
impl !UnwindSafe for AuthenticatedSession
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