Skip to main content

Cdp

Struct Cdp 

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

Implementations§

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 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 notify( &mut self, method: &str, params: Value, session_id: Option<&str>, ) -> Result<(), String>

Source

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

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>

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.