pulsar_binary_protocol_spec/client_handler/
errors.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use std::io::Error as IoError;

use crate::frame::{FrameParseError, FrameRenderError};

use thiserror::Error;

#[derive(Error, Debug)]
pub enum WriteCommandError {
    #[error("FrameRenderError {0:?}")]
    FrameRenderError(#[from] FrameRenderError),
    #[error("WriteError {0:?}")]
    WriteError(#[from] IoError),
}
#[derive(Error, Debug)]
pub enum ReadCommandError {
    #[error("ReadError {0:?}")]
    ReadError(#[from] IoError),
    #[error("FrameParseError {0:?}")]
    FrameParseError(#[from] FrameParseError),
}