/// Crate-level result alias.
pub type Result<T> = Result;
/// Errors that can occur during packet encoding, decoding, or registry dispatch.
///
/// This error type wraps `basalt_types::Error` for lower-level serialization
/// failures and adds protocol-specific errors like unknown packet IDs.
/// Higher layers (basalt-net) wrap this error in turn via `#[from]`.