diff options
Diffstat (limited to 'lampada/src/error.rs')
-rw-r--r-- | lampada/src/error.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lampada/src/error.rs b/lampada/src/error.rs index 40be012..f29d0cc 100644 --- a/lampada/src/error.rs +++ b/lampada/src/error.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -#[cfg(not(target_arch = "wasm32"))] -use ::tokio::time::error::Elapsed; use stanza::client::Stanza; use thiserror::Error; use tokio::sync::{mpsc::error::SendError, oneshot::error::RecvError}; +#[cfg(not(target_arch = "wasm32"))] +use tokio::time::error::Elapsed; #[cfg(target_arch = "wasm32")] use tokio::time::Elapsed; #[cfg(target_arch = "wasm32")] @@ -28,6 +28,7 @@ pub enum ConnectionError { } #[derive(Debug, Error, Clone)] +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub enum CommandError<T> { #[error("actor: {0}")] Actor(ActorError), @@ -61,6 +62,7 @@ pub enum ReadError { } #[derive(Debug, Error, Clone)] +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub enum ActorError { #[error("receive timed out")] Timeout, |