pub struct Interception<'a> { /* private fields */ }Implementations§
Source§impl<'a> Interception<'a>
impl<'a> Interception<'a>
pub fn attach( cdp: &'a mut Cdp, target_id: &str, patterns: &[Pattern], ) -> Result<Self, String>
pub fn on_session( cdp: &'a mut Cdp, target_id: &str, session_id: &str, patterns: &[Pattern], ) -> Result<Self, String>
pub fn session_id(&self) -> &str
pub fn next(&mut self, timeout: Duration) -> Result<Option<Paused>, String>
pub fn decide( &mut self, paused: &Paused, decision: &Decision, ) -> Result<(), String>
pub fn response_body(&mut self, paused: &Paused) -> Result<Vec<u8>, String>
pub fn finish(self)
Methods from Deref<Target = Cdp>§
pub fn events(&self) -> &[Value]
pub fn guard(&self) -> &Protected
pub fn protect_origins(&mut self, extra_origins: &[&str])
pub fn session_blocked(&self, session_id: &str) -> bool
pub fn is_protected_target(&self, target_id: &str) -> bool
pub fn set_decider(&mut self, session_id: &str, decider: Option<Decider>)
pub fn has_decider(&self, session_id: &str) -> bool
pub fn take_fetch_errors(&mut self) -> Vec<String>
pub fn call( &mut self, method: &str, params: Value, session_id: Option<&str>, ) -> Result<Value, String>
pub fn call_for( &mut self, method: &str, params: Value, session_id: Option<&str>, timeout: Duration, ) -> Result<Value, String>
pub fn notify( &mut self, method: &str, params: Value, session_id: Option<&str>, ) -> Result<(), String>
pub fn target_protected( &mut self, target_id: &str, frame: bool, ) -> Result<bool, String>
pub fn pump(&mut self, deadline: Instant) -> Result<bool, String>
pub fn next_paused( &mut self, session_id: Option<&str>, timeout: Duration, ) -> Result<Option<Paused>, String>
pub fn wait_event( &mut self, from: usize, timeout: Duration, matches: impl FnMut(&Value) -> bool, ) -> Result<Option<Value>, String>
pub fn wait_load(&mut self, session_id: &str) -> Result<(), String>
pub fn wait_load_since( &mut self, session_id: &str, from: usize, ) -> Result<(), String>
Trait Implementations§
Source§impl Deref for Interception<'_>
impl Deref for Interception<'_>
Source§impl DerefMut for Interception<'_>
impl DerefMut for Interception<'_>
Source§impl Drop for Interception<'_>
impl Drop for Interception<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Interception<'a>
impl<'a> !Send for Interception<'a>
impl<'a> !Sync for Interception<'a>
impl<'a> !UnwindSafe for Interception<'a>
impl<'a> Freeze for Interception<'a>
impl<'a> Unpin for Interception<'a>
impl<'a> UnsafeUnpin for Interception<'a>
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