1pub mod client;
4pub mod sampler;
5
6pub use client::WorkerClient;
7pub use sampler::argmax;
8
9#[derive(Debug, thiserror::Error)]
10pub enum AgentError {
11 #[error("io: {0}")]
12 Io(#[from] std::io::Error),
13 #[error("envelope: {0}")]
14 Envelope(#[from] superfluid_proto::EnvelopeError),
15 #[error("payload decode: {0}")]
16 Payload(#[from] postcard::Error),
17 #[error("shm: {0}")]
18 Shm(#[from] superfluid_shm::ShmError),
19 #[error("protocol violation: {0}")]
20 Protocol(&'static str),
21 #[error("worker rejected the request with status {0}")]
22 Rejected(i32),
23 #[error("peer closed the connection")]
24 Closed,
25}