datacake_rpc/net/mod.rs
1mod client;
2mod server;
3mod status;
4
5#[cfg(feature = "simulation")]
6mod simulation;
7
8use std::io;
9
10pub use client::Channel;
11pub(crate) use server::start_rpc_server;
12pub use status::{ArchivedErrorCode, ArchivedStatus, ErrorCode, Status};
13
14#[derive(Debug, thiserror::Error)]
15/// A failure in an RPC operation.
16pub enum Error {
17 #[error("IO Error: {0}")]
18 /// The system failed to complete operation due to an IO error.
19 Io(#[from] io::Error),
20 #[error("Hyper Error: {0}")]
21 /// The operation failed due an error originating in hyper.
22 Hyper(#[from] hyper::Error),
23}