casper-binary-port 1.1.1

Types for the casper node binary port
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;

#[derive(Error, Debug)]
pub enum Error {
    #[error("Invalid command tag ({0})")]
    InvalidCommandTag(u8),
    #[error("Request too large: allowed {allowed} bytes, got {got} bytes")]
    RequestTooLarge { allowed: u32, got: u32 },
    #[error("Empty request")]
    EmptyRequest,
    #[error(transparent)]
    Io(#[from] std::io::Error),
    #[error(transparent)]
    BytesRepr(#[from] casper_types::bytesrepr::Error),
}