#[non_exhaustive]pub enum Error {
Tauri(Error),
Io(Error),
Json(Error),
UnknownProgramName(String),
ForbiddenPath {
path: String,
with: Option<String>,
},
ForbiddenUrl {
url: String,
with: Option<String>,
},
UnsupportedPlatform,
NoParent(PathBuf),
FailedToConvertPathToFileUrl,
Zbus(Error),
}Expand description
The error type returned by the opener plugin’s commands and APIs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Tauri(Error)
Forwarded from a tauri::Error, e.g. when resolving a scoped path fails.
Io(Error)
Forwarded from an std::io::Error raised while opening or revealing a path.
Json(Error)
Forwarded from a serde_json::Error raised while (de)serializing a mobile plugin payload.
UnknownProgramName(String)
The program passed as with is not a program name known by the underlying opener.
ForbiddenPath
The path is not allowed by the opener scope, optionally together with the program it was requested to be opened with.
Fields
ForbiddenUrl
The URL is not allowed by the opener scope, optionally together with the program it was requested to be opened with.
Fields
UnsupportedPlatform
The requested API is not supported on the current platform, e.g. crate::reveal_item_in_dir on Android and iOS.
NoParent(PathBuf)
The given path has no parent directory, so it cannot be revealed in its containing folder.
FailedToConvertPathToFileUrl
Failed to convert the path to a file:// URL, which is required to reveal it via D-Bus on Linux and BSD.
Zbus(Error)
Forwarded from a zbus::Error raised while talking to the file manager or the desktop portal over D-Bus.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()