tauri_plugin_taskbar/
error.rs1pub type Result<T> = std::result::Result<T, Error>;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5 #[error("{0}")]
6 Message(String),
7 #[error(transparent)]
8 Tauri(#[from] tauri::Error),
9 #[cfg(target_os = "windows")]
10 #[error(transparent)]
11 Windows(#[from] windows::core::Error),
12}
13
14impl From<&str> for Error {
15 fn from(value: &str) -> Self {
16 Self::Message(value.to_string())
17 }
18}
19
20impl From<String> for Error {
21 fn from(value: String) -> Self {
22 Self::Message(value)
23 }
24}