epcis-models 0.1.4

Type-safe GS1 EPCIS 2.0 event models implemented natively in Rust.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Error types for the EPCIS models crate.

use thiserror::Error;

/// Enumeration of all error types in the EPCIS model crate.
#[derive(Debug, Error, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum EpcisModelError {
    /// Invalid Electronic Product Code (EPC) URN or Digital Link.
    #[error("invalid EPC: {0}")]
    InvalidEpc(String),

    /// Invalid GS1 URI.
    #[error("invalid URI: {0}")]
    InvalidUri(String),
}