pub struct WebSocket { /* private fields */ }Expand description
A WebSocket connection being monitored.
This struct represents an active WebSocket connection and provides methods to register handlers for frame events.
Implementations§
Source§impl WebSocket
impl WebSocket
Sourcepub fn request_id(&self) -> &str
pub fn request_id(&self) -> &str
Get the request ID for this WebSocket.
Sourcepub async fn on_framesent<F, Fut>(&self, handler: F)
pub async fn on_framesent<F, Fut>(&self, handler: F)
Sourcepub async fn on_framereceived<F, Fut>(&self, handler: F)
pub async fn on_framereceived<F, Fut>(&self, handler: F)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebSocket
impl RefUnwindSafe for WebSocket
impl Send for WebSocket
impl Sync for WebSocket
impl Unpin for WebSocket
impl UnwindSafe for WebSocket
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