pub enum CdpError {
WebSocket(Box<Error>),
Http(Error),
Json(Error),
Io(Error),
InvalidUrl(String),
Protocol(String),
Timeout,
NoTarget,
}Expand description
Errors returned by every fallible operation in this crate.
Variants§
WebSocket(Box<Error>)
The CDP WebSocket connection failed or dropped.
Http(Error)
A request to Chrome’s HTTP endpoint (/json/*) failed.
Json(Error)
A CDP payload failed to (de)serialize.
Io(Error)
A filesystem operation (e.g. writing a screenshot) failed.
InvalidUrl(String)
A URL supplied by the caller or returned by Chrome was malformed or missing.
Protocol(String)
Chrome returned a CDP protocol-level error, or a response was shaped unexpectedly.
Timeout
A command or event wait exceeded its configured timeout.
NoTarget
No page target was available to connect to (e.g. list_targets returned none).
Trait Implementations§
Source§impl Error for CdpError
impl Error for CdpError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for CdpError
impl !UnwindSafe for CdpError
impl Freeze for CdpError
impl Send for CdpError
impl Sync for CdpError
impl Unpin for CdpError
impl UnsafeUnpin for CdpError
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