domain/payment/error.rs
1#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
2/// Validation failures returned by payment domain constructors.
3pub enum Error {
4 #[error("payment reference must not be empty")]
5 /// Payment reference was blank after trimming.
6 EmptyReference,
7 #[error("payment reference must be 160 characters or fewer")]
8 /// Payment reference exceeded the accepted storage length.
9 ReferenceTooLong,
10}
11
12/// Result type returned by fallible payment error operations.
13pub type Result<T> = std::result::Result<T, Error>;