mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-22 21:30:44 +02:00
chore: update documentation
This commit is contained in:
@@ -4,12 +4,21 @@
|
||||
|
||||
use serde::{ser::Serializer, Serialize};
|
||||
|
||||
/// Alias for a [`std::result::Result`] with the error type [`Error`].
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
/// Errors returned by the NFC plugin.
|
||||
///
|
||||
/// Serializes to the error message string, so it can be returned directly from a command.
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum Error {
|
||||
/// An I/O error happened.
|
||||
#[error(transparent)]
|
||||
Io(#[from] std::io::Error),
|
||||
/// The call to the Android or iOS plugin implementation failed,
|
||||
/// either because the arguments could not be serialized, the response could not be
|
||||
/// deserialized or the native side rejected the call (e.g. NFC is unavailable
|
||||
/// or the tag could not be read or written).
|
||||
#[cfg(mobile)]
|
||||
#[error(transparent)]
|
||||
PluginInvoke(#[from] tauri::plugin::mobile::PluginInvokeError),
|
||||
|
||||
Reference in New Issue
Block a user