mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-08-23 19:32:29 +02:00
refactor: add methods and implement traits for FilePath and SafeFilePath (#1727)
* refactor: add methods and implement traits for `FilePath` and `SafeFilePath` closes #1726 * clippy * path -> as_path * fix prettierignore * Discard changes to Cargo.lock * Discard changes to Cargo.toml * update tauri deps
This commit is contained in:
@@ -7,6 +7,7 @@ use std::path::PathBuf;
|
||||
use serde::{Serialize, Serializer};
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
#[non_exhaustive]
|
||||
pub enum Error {
|
||||
#[error(transparent)]
|
||||
Json(#[from] serde_json::Error),
|
||||
@@ -26,6 +27,10 @@ pub enum Error {
|
||||
#[cfg(target_os = "android")]
|
||||
#[error(transparent)]
|
||||
PluginInvoke(#[from] tauri::plugin::mobile::PluginInvokeError),
|
||||
#[error("URL is not a valid path")]
|
||||
InvalidPathUrl,
|
||||
#[error("Unsafe PathBuf: {0}")]
|
||||
UnsafePathBuf(&'static str),
|
||||
}
|
||||
|
||||
impl Serialize for Error {
|
||||
|
||||
Reference in New Issue
Block a user