error.rs 637 B

123456789101112131415161718
  1. use steel::*;
  2. /// A [Result] type representing `Result<T, CloseAccountError>`
  3. pub type CloseAccountResult<T> = Result<T, CloseAccountError>;
  4. /// Error handling enum for this create
  5. #[derive(Debug, Error, Clone, Copy, PartialEq, Eq, IntoPrimitive)]
  6. #[repr(u32)]
  7. pub enum CloseAccountError {
  8. /// A name can only be 64 bytes in length when converted to bytes
  9. #[error("Invalid Name Length. The maximum length of the string is 64 bytes.")]
  10. MaxNameLengthExceeded = 0,
  11. /// Only UTF-8 String types are supported
  12. #[error("Only UTF-8 String encoding is supported")]
  13. OnlyUtf8IsSupported = 1,
  14. }
  15. error!(CloseAccountError);