Skip to main content

Cdp

Struct Cdp 

Source
pub struct Cdp { /* private fields */ }

Implementations§

Source§

impl Cdp

Source

pub fn start_webmcp(&mut self, session: &str) -> Result<String, String>

Source

pub fn webmcp_auto_attach(&mut self, session: &str) -> Result<(), String>

Source

pub fn take_webmcp_children(&mut self) -> Vec<(String, String, String)>

Source

pub fn webmcp_pause_micros(&self) -> &[u128]

Source

pub fn webmcp_document( &mut self, session: &str, frame: &str, ) -> Result<Value, String>

Source

pub fn webmcp_snapshot(&self) -> Vec<Value>

Source

pub fn webmcp_alive(&self, session: &str) -> bool

Source

pub fn webmcp_settled(&self) -> bool

Source

pub fn webmcp_generations(&self) -> Vec<Value>

Source

pub fn stop_webmcp(&mut self, session: &str)

Source

pub fn webmcp_trace_result<T>( &self, session: &str, stage: &str, result: Result<T, String>, ) -> Result<T, String>

Source

pub fn webmcp_trace_stage(&self, session: &str, event: &str, reason: &str)

Source§

impl Cdp

Source

pub fn connect(url: &str) -> Result<Self, String>

Source

pub fn from_transport(ws: Box<dyn Transport>) -> Self

Source

pub fn events(&self) -> &[Value]

Source

pub fn guard(&self) -> &Protected

Source

pub fn protect_origins(&mut self, extra_origins: &[&str])

Source

pub fn take_notices(&mut self) -> Vec<String>

Source

pub fn unguarded_optional(&self, target_id: &str) -> Vec<String>

Source

pub fn session_blocked(&self, session_id: &str) -> bool

Source

pub fn content_blocked(&self, session_id: &str) -> bool

Source

pub fn is_protected_target(&self, target_id: &str) -> bool

Source

pub fn set_decider(&mut self, session_id: &str, decider: Option<Decider>)

Source

pub fn has_decider(&self, session_id: &str) -> bool

Source

pub fn take_fetch_errors(&mut self) -> Vec<String>

Source

pub fn call( &mut self, method: &str, params: Value, session_id: Option<&str>, ) -> Result<Value, String>

Source

pub fn call_for( &mut self, method: &str, params: Value, session_id: Option<&str>, timeout: Duration, ) -> Result<Value, String>

Source

pub fn start_navigation( &mut self, params: Value, session: Option<&str>, ) -> Result<i64, String>

Source

pub fn poll_navigation(&mut self, id: i64) -> Option<Result<Value, String>>

Source

pub fn cancel_navigation(&mut self, id: i64)

Source

pub fn notify( &mut self, method: &str, params: Value, session_id: Option<&str>, ) -> Result<(), String>

Source

pub fn settled_refusal( &self, method: &str, params: &Value, session_id: Option<&str>, ) -> Option<String>

Source

pub fn target_protected( &mut self, target_id: &str, frame: bool, ) -> Result<bool, String>

Source

pub fn created_blank(&self, target: &str) -> Option<Value>

Source

pub fn restore_created_blank(&mut self, target: &str, proof: &Value) -> bool

Source

pub fn recovering(&self, target_id: &str) -> bool

Source

pub fn ordinary_redirect_target( &self, source: &str, target: &str, ) -> Result<String, String>

Source

pub fn ordinary_response_body(&self, session: &str, request_id: &str) -> bool

Source

pub fn redact_redirect_carriers(&self, headers: &mut Value, source: &str)

Source

pub fn set_waiter(&mut self, waiter: Option<Waiter>)

Source

pub fn pump(&mut self, deadline: Instant) -> Result<bool, String>

Source

pub fn next_paused( &mut self, session_id: Option<&str>, timeout: Duration, ) -> Result<Option<Paused>, String>

Source

pub fn wait_event( &mut self, from: usize, timeout: Duration, matches: impl FnMut(&Value) -> bool, ) -> Result<Option<Value>, String>

Source

pub fn wait_load(&mut self, session_id: &str) -> Result<(), String>

Source

pub fn wait_load_since( &mut self, session_id: &str, from: usize, ) -> Result<(), String>

Source§

impl Cdp

Source

pub fn dialog_targets(&mut self) -> Result<Vec<String>, String>

Source

pub fn attach_dialog(&mut self, target: &str) -> Result<String, String>

Source

pub fn dialog_ready(&mut self, session: &str) -> Result<Value, String>

Source

pub fn dialog_attached(&self, session: &str, target: &str) -> bool

Source

pub fn dialog_id(&self, session: &str) -> Option<u64>

Source

pub fn verify_dialog(&mut self, session: &str, epoch: u64) -> Result<(), String>

Source

pub fn wait_dialog( &mut self, session: &str, timeout: Duration, ) -> Result<(), String>

Source§

impl Cdp

Source

pub fn bring_forward(&mut self, session: &str) -> Result<Front, String>

Source

pub fn restore_front(&mut self, front: Front) -> Result<(), String>

Trait Implementations§

Source§

impl Drop for Cdp

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Cdp

§

impl !Send for Cdp

§

impl !Sync for Cdp

§

impl !UnwindSafe for Cdp

§

impl Freeze for Cdp

§

impl Unpin for Cdp

§

impl UnsafeUnpin for Cdp

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.