pub struct WebInspectorClient<S> { /* private fields */ }Implementations§
Source§impl<S: AsyncRead + AsyncWrite + Unpin> WebInspectorClient<S>
impl<S: AsyncRead + AsyncWrite + Unpin> WebInspectorClient<S>
pub fn new(stream: S) -> Self
pub fn with_connection_id(stream: S, connection_id: impl Into<String>) -> Self
pub fn connection_id(&self) -> &str
pub fn automation_availability(&self) -> Option<AutomationAvailability>
pub fn applications(&self) -> &IndexMap<String, Application>
pub fn application_pages( &self, application_id: &str, ) -> Option<&IndexMap<u64, Page>>
pub fn application_by_bundle( &self, bundle_identifier: &str, ) -> Option<&Application>
pub fn page(&self, application_id: &str, page_id: u64) -> Option<&Page>
pub fn automation_page_by_session( &self, application_id: &str, session_id: &str, ) -> Option<&Page>
pub fn open_pages_snapshot(&self) -> Vec<ApplicationPage>
pub async fn start( &mut self, timeout_duration: Duration, ) -> Result<(), WebInspectorError>
Sourcepub async fn open_application_pages(
&mut self,
idle_timeout: Duration,
) -> Result<Vec<ApplicationPage>, WebInspectorError>
pub async fn open_application_pages( &mut self, idle_timeout: Duration, ) -> Result<Vec<ApplicationPage>, WebInspectorError>
Discovers all open application pages on the device.
Sends _rpc_getConnectedApplications: and consumes incoming events until no
new event arrives within idle_timeout. The timeout signals quiescence (no
more pages are being reported) and is the expected completion path — it is
not an error. Returns the accumulated snapshot of open pages.
pub async fn report_identifier(&mut self) -> Result<(), WebInspectorError>
pub async fn request_connected_applications( &mut self, ) -> Result<(), WebInspectorError>
pub async fn request_listing( &mut self, application_id: &str, ) -> Result<(), WebInspectorError>
pub async fn request_application_launch( &mut self, bundle_identifier: &str, ) -> Result<(), WebInspectorError>
pub async fn request_automation_session( &mut self, session_id: &str, application_id: &str, ) -> Result<(), WebInspectorError>
pub async fn send_socket_setup( &mut self, session_id: &str, application_id: &str, page_id: u64, pause: bool, ) -> Result<(), WebInspectorError>
pub async fn send_socket_data( &mut self, session_id: &str, application_id: &str, page_id: u64, message: &JsonValue, ) -> Result<(), WebInspectorError>
pub async fn next_event( &mut self, ) -> Result<WebInspectorEvent, WebInspectorError>
pub async fn next_event_with_timeout( &mut self, timeout_duration: Duration, ) -> Result<WebInspectorEvent, WebInspectorError>
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for WebInspectorClient<S>where
S: Freeze,
impl<S> RefUnwindSafe for WebInspectorClient<S>where
S: RefUnwindSafe,
impl<S> Send for WebInspectorClient<S>where
S: Send,
impl<S> Sync for WebInspectorClient<S>where
S: Sync,
impl<S> Unpin for WebInspectorClient<S>where
S: Unpin,
impl<S> UnsafeUnpin for WebInspectorClient<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for WebInspectorClient<S>where
S: UnwindSafe,
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