pub struct WebSocketUpgrade { /* private fields */ }
Expand description
WebSocket upgrade handler - provides clean API over Axum WebSocket This is a simplified version for the foundation
Implementations§
Source§impl WebSocketUpgrade
impl WebSocketUpgrade
Sourcepub fn new(registry: Arc<ConnectionRegistry>) -> Self
pub fn new(registry: Arc<ConnectionRegistry>) -> Self
Create a new WebSocket upgrade handler
Sourcepub fn with_config(
registry: Arc<ConnectionRegistry>,
config: WebSocketConfig,
) -> Self
pub fn with_config( registry: Arc<ConnectionRegistry>, config: WebSocketConfig, ) -> Self
Create with custom configuration
Sourcepub async fn upgrade<H, F>(
self,
ws: AxumWebSocketUpgrade,
_handler: H,
) -> Responsewhere
H: FnOnce(ConnectionId, Arc<WebSocketConnection>) -> F + Send + 'static,
F: Future<Output = ()> + Send + 'static,
pub async fn upgrade<H, F>(
self,
ws: AxumWebSocketUpgrade,
_handler: H,
) -> Responsewhere
H: FnOnce(ConnectionId, Arc<WebSocketConnection>) -> F + Send + 'static,
F: Future<Output = ()> + Send + 'static,
Upgrade an HTTP connection to WebSocket Simplified for foundation - full implementation in later iterations
Auto Trait Implementations§
impl Freeze for WebSocketUpgrade
impl !RefUnwindSafe for WebSocketUpgrade
impl Send for WebSocketUpgrade
impl Sync for WebSocketUpgrade
impl Unpin for WebSocketUpgrade
impl !UnwindSafe for WebSocketUpgrade
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