#[non_exhaustive]pub enum OpenError {
NoDisplay {
why: String,
},
Refused(String),
Failed(String),
}Expand description
Why an Opener did not open a URL.
NoDisplay is the one a host must act on: this machine has no screen a
browser could appear on (an SSH session, or Linux/BSD with neither
DISPLAY nor WAYLAND_DISPLAY), NOTHING was launched, and the person
needs the URL itself — ScreensCtx::open_url says so in its notice,
and a host (the gateway console’s Apps → Open) shows the link instead.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoDisplay
No display here; why in plain words. Nothing was launched.
Refused(String)
Refused before anything ran (only http(s) links are opened).
Failed(String)
The system opener could not be started.
Trait Implementations§
impl Eq for OpenError
Source§impl Error for OpenError
impl Error for OpenError
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()
impl StructuralPartialEq for OpenError
Auto Trait Implementations§
impl Freeze for OpenError
impl RefUnwindSafe for OpenError
impl Send for OpenError
impl Sync for OpenError
impl Unpin for OpenError
impl UnsafeUnpin for OpenError
impl UnwindSafe for OpenError
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