Skip to main content

tauri_plugin_os/
error.rs

1// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
2// SPDX-License-Identifier: Apache-2.0
3// SPDX-License-Identifier: MIT
4
5use serde::{Serialize, Serializer};
6
7/// All errors that can occur while running the os plugin.
8///
9/// This enum currently has no variants: none of the plugin's commands can fail.
10#[derive(Debug, thiserror::Error)]
11pub enum Error {}
12
13impl Serialize for Error {
14    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15    where
16        S: Serializer,
17    {
18        serializer.serialize_str(self.to_string().as_ref())
19    }
20}