Download packages/tauri-plugins/plugins/shell/src/error.rs from echodict/readest: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/datasets/echodict/readest/resolve/main/packages/tauri-plugins/plugins/shell/src/error.rs
- Command line
-
hf download hf://datasets/echodict/readest/packages/tauri-plugins/plugins/shell/src/error.rs
-
curl -L -o error.rs https://huggingface.co/datasets/echodict/readest/resolve/main/packages/tauri-plugins/plugins/shell/src/error.rs
1.42 kB
| // Copyright 2019-2023 Tauri Programme within The Commons Conservancy | |
| // SPDX-License-Identifier: Apache-2.0 | |
| // SPDX-License-Identifier: MIT | |
| use std::path::PathBuf; | |
| use serde::{Serialize, Serializer}; | |
| pub enum Error { | |
| PluginInvoke( tauri::plugin::mobile::PluginInvokeError), | |
| Io( std::io::Error), | |
| CurrentExeHasNoParent, | |
| UnknownProgramName(String), | |
| Scope( crate::scope::Error), | |
| /// Sidecar not allowed by the configuration. | |
| SidecarNotAllowed(PathBuf), | |
| /// Program not allowed by the scope. | |
| ProgramNotAllowed(PathBuf), | |
| UnknownEncoding(String), | |
| /// JSON error. | |
| Json( serde_json::Error), | |
| /// Utf8 error. | |
| Utf8( std::string::FromUtf8Error), | |
| } | |
| impl Serialize for Error { | |
| fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error> | |
| where | |
| S: Serializer, | |
| { | |
| serializer.serialize_str(self.to_string().as_ref()) | |
| } | |
| } | |