pub enum BrowserError {
Browser {
reason: String,
},
Navigation {
reason: String,
},
Interaction {
reason: String,
},
Auth {
reason: String,
},
Config {
reason: String,
},
Timeout {
reason: String,
},
}Expand description
Errors arising from headless-browser automation.
Variants§
Browser
Browser launch, connection, or low-level CDP failure.
Page navigation failure.
Interaction
DOM interaction failure (element not found, click/fill failed).
Auth
Authentication / session failure (no cookies captured, expired session).
Config
Configuration error (invalid launch config, missing values).
Timeout
Operation exceeded its deadline.
Implementations§
Source§impl BrowserError
impl BrowserError
Sourcepub fn browser(reason: impl Into<String>) -> Self
pub fn browser(reason: impl Into<String>) -> Self
Construct a BrowserError::Browser.
Construct a BrowserError::Navigation.
Sourcepub fn interaction(reason: impl Into<String>) -> Self
pub fn interaction(reason: impl Into<String>) -> Self
Construct a BrowserError::Interaction.
Sourcepub fn auth(reason: impl Into<String>) -> Self
pub fn auth(reason: impl Into<String>) -> Self
Construct a BrowserError::Auth.
Sourcepub fn config(reason: impl Into<String>) -> Self
pub fn config(reason: impl Into<String>) -> Self
Construct a BrowserError::Config.
Sourcepub fn timeout(reason: impl Into<String>) -> Self
pub fn timeout(reason: impl Into<String>) -> Self
Construct a BrowserError::Timeout.
Sourcepub const fn is_transient(&self) -> bool
pub const fn is_transient(&self) -> bool
Whether this error is transient and may succeed on retry.
Trait Implementations§
Source§impl Debug for BrowserError
impl Debug for BrowserError
Source§impl Display for BrowserError
impl Display for BrowserError
Source§impl Error for BrowserError
impl Error for BrowserError
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 Freeze for BrowserError
impl RefUnwindSafe for BrowserError
impl Send for BrowserError
impl Sync for BrowserError
impl Unpin for BrowserError
impl UnsafeUnpin for BrowserError
impl UnwindSafe for BrowserError
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