use serde::{Deserialize, Serialize}; use std::fmt::Debug; use crate::model::{instance::Instance, user::User}; pub mod authentication; pub mod discovery; pub mod error; pub mod handshake; pub mod issues; pub mod repository; pub mod user; #[derive(Clone, Debug, Serialize, Deserialize, thiserror::Error)] pub enum ErrorMessage { #[error("user {0} doesn't exist or isn't valid in this context")] InvalidUser(User), #[error("internal error: shutdown")] Shutdown, } pub trait MessageTarget { fn target(&self) -> Option { None } }