2020-06-28 16:34:43 +03:00
|
|
|
//! Tauri utility helpers
|
|
|
|
#![warn(missing_docs, rust_2018_idioms)]
|
|
|
|
|
|
|
|
/// Platform helpers
|
2020-01-18 03:33:17 +03:00
|
|
|
pub mod platform;
|
2020-06-28 16:34:43 +03:00
|
|
|
/// Process helpers
|
2020-01-18 03:33:17 +03:00
|
|
|
pub mod process;
|
|
|
|
|
2020-05-30 02:22:04 +03:00
|
|
|
pub use anyhow::Result;
|
|
|
|
use thiserror::Error;
|
2020-01-18 03:33:17 +03:00
|
|
|
|
2020-06-28 16:34:43 +03:00
|
|
|
/// The error types.
|
2020-05-30 02:22:04 +03:00
|
|
|
#[derive(Error, Debug)]
|
|
|
|
pub enum Error {
|
2020-06-28 16:34:43 +03:00
|
|
|
/// Target triple architecture error
|
2020-06-18 00:11:11 +03:00
|
|
|
#[error("Unable to determine target-architecture")]
|
|
|
|
Architecture,
|
2020-06-28 16:34:43 +03:00
|
|
|
/// Target triple OS error
|
2020-06-18 00:11:11 +03:00
|
|
|
#[error("Unable to determine target-os")]
|
|
|
|
OS,
|
2020-06-28 16:34:43 +03:00
|
|
|
/// Target triple environment error
|
2020-06-18 00:11:11 +03:00
|
|
|
#[error("Unable to determine target-environment")]
|
|
|
|
Environment,
|
2020-06-28 16:34:43 +03:00
|
|
|
/// Target triple unknown target-os error
|
2020-06-18 00:11:11 +03:00
|
|
|
#[error("Unknown target_os")]
|
|
|
|
Unknown,
|
2020-06-28 16:34:43 +03:00
|
|
|
/// Get parent process error
|
2020-06-18 00:11:11 +03:00
|
|
|
#[error("Could not get parent process")]
|
|
|
|
ParentProcess,
|
2020-06-28 16:34:43 +03:00
|
|
|
/// Get parent process PID error
|
2020-06-18 00:11:11 +03:00
|
|
|
#[error("Could not get parent PID")]
|
|
|
|
ParentPID,
|
2020-06-28 16:34:43 +03:00
|
|
|
/// Get child process error
|
2020-06-18 00:11:11 +03:00
|
|
|
#[error("Could not get child process")]
|
|
|
|
ChildProcess,
|
|
|
|
}
|