pub struct WebSocketManager { /* private fields */ }Expand description
Manager for WebSocket events on a page.
Implementations§
Source§impl WebSocketManager
impl WebSocketManager
Sourcepub fn new(connection: Arc<CdpConnection>, session_id: String) -> Self
pub fn new(connection: Arc<CdpConnection>, session_id: String) -> Self
Create a new WebSocket manager for a page.
Sourcepub async fn set_handler<F, Fut>(&self, handler: F)
pub async fn set_handler<F, Fut>(&self, handler: F)
Set a handler for WebSocket created events.
Sourcepub async fn remove_handler(&self)
pub async fn remove_handler(&self)
Remove the WebSocket handler.
Auto Trait Implementations§
impl !Freeze for WebSocketManager
impl !RefUnwindSafe for WebSocketManager
impl Send for WebSocketManager
impl Sync for WebSocketManager
impl Unpin for WebSocketManager
impl !UnwindSafe for WebSocketManager
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