simple_someip/e2e/error.rs
1use thiserror::Error;
2
3/// Errors that can occur during E2E protection or checking.
4#[derive(Error, Debug)]
5#[non_exhaustive]
6pub enum Error {
7 /// The output buffer is too small to hold the protected payload.
8 #[error("output buffer too small: need {needed} bytes, got {actual}")]
9 BufferTooSmall {
10 /// The number of bytes required.
11 needed: usize,
12 /// The number of bytes available.
13 actual: usize,
14 },
15}