Skip to main content

dff/
lib.rs

1pub mod client;
2pub mod server;
3
4pub use client::Client;
5pub use server::Server;
6
7#[derive(Debug, thiserror::Error)]
8pub enum Error {
9    #[error("IO error: {0}")]
10    Io(#[from] std::io::Error),
11
12    #[error("Connection error: {0}")]
13    Connection(String),
14
15    #[error("Protocol error: {0}")]
16    Protocol(String),
17
18    #[error("Client error: {0}")]
19    Client(String),
20}
21
22pub type Result<T> = std::result::Result<T, Error>;