trippy_packet/error.rs
1use thiserror::Error;
2
3/// A packet error result.
4pub type Result<T> = std::result::Result<T, Error>;
5
6/// A packet error.
7#[derive(Error, Debug, Eq, PartialEq)]
8pub enum Error {
9 /// Attempting to create a packet with an insufficient buffer size.
10 #[error("insufficient buffer for {0} packet, minimum={1}, provided={2}")]
11 InsufficientPacketBuffer(String, usize, usize),
12}