pub struct CdpSession<T: ConnectionTransport> {
pub session_id: Option<String>,
/* private fields */
}Fields§
§session_id: Option<String>Implementations§
Source§impl<T: ConnectionTransport> CdpSession<T>
impl<T: ConnectionTransport> CdpSession<T>
pub async fn ws_new( config: &ConnectionTransportConfig, ) -> CdpSession<WebsocketConnectionTransport>
pub async fn register_event_listener( &mut self, tx: UnboundedSender<EventResponse>, )
pub async fn send_and_get_receiver( &mut self, command: impl Into<CdpCommand>, ) -> Receiver<CdpCommandResponseState>
pub async fn send( &mut self, command: impl Into<CdpCommand>, ) -> Result<CommandResponse, CdpSessionSendError>
pub async fn close(&self)
Trait Implementations§
Source§impl<T: ConnectionTransport> CdpEventManagement for CdpSession<T>
impl<T: ConnectionTransport> CdpEventManagement for CdpSession<T>
fn get_events(&mut self) -> &mut Arc<Mutex<Vec<CdpEvent>>>
fn push_event(&mut self, event: CdpEvent)
fn add_event_handler<F, R>( &mut self, methods: impl IntoIterator<Item = impl Into<String>>, handler: F, ) -> String
fn remove_cdp_event_handler(&mut self, id: &str)
fn event_dispatch( &mut self, ) -> impl Future<Output = (JoinHandle<()>, UnboundedSender<EventResponse>)>
Auto Trait Implementations§
impl<T> Freeze for CdpSession<T>where
T: Freeze,
impl<T> !RefUnwindSafe for CdpSession<T>
impl<T> Send for CdpSession<T>where
T: Send,
impl<T> Sync for CdpSession<T>where
T: Sync,
impl<T> Unpin for CdpSession<T>where
T: Unpin,
impl<T> UnsafeUnpin for CdpSession<T>where
T: UnsafeUnpin,
impl<T> !UnwindSafe for CdpSession<T>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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