use thiserror::Error;
#[derive(Error, Debug)]
pub enum MessageParseError {
#[error("Error deserialising message: {0}")]
Deserialisation(#[from] serde_json::Error),
#[error("Error decoding line: {0}")]
LinesCodecError(#[from] tokio_util::codec::LinesCodecError),
}
#[derive(Error, Debug)]
pub enum TransportError {
#[error("JSON serialisation error: {0}")]
Serialisation(#[from] serde_json::Error),
#[error("Error sending/receiving bytes: {0}")]
LinesCodecError(#[from] tokio_util::codec::LinesCodecError),
}
mod stdio;
pub use stdio::StdioTransport;