cat_dev/mion/proto/control/
errors.rs

1//! Error types related to MION Control related data.
2
3use miette::Diagnostic;
4use thiserror::Error;
5
6/// Errors specifically for MION Control Protocol related errors.
7#[derive(Diagnostic, Error, Debug, PartialEq, Eq)]
8pub enum MionControlProtocolError {
9	/// Unknown Packet Type/Command.
10	#[error(
11		"Unknown Code aka Packet Type for MION CONTROL: `{0}` received from the network (this may mean your CAT-DEV is doing something we didn't expect)"
12	)]
13	#[diagnostic(code(cat_dev::net::parse::mion::control::unknown_packet_type))]
14	UnknownCommand(u8),
15}