1use {
2 crate::no_std::{
3 fmt::{Debug, Display},
4 hash::Hash,
5 String, Vec,
6 },
7 thiserror::Error,
8};
9
10pub trait Format:
12 Clone + Debug + Display + Send + Sync + 'static + Eq + Ord + Sized + Hash
13{
14}
15
16#[derive(Debug, Error)]
17pub enum FormatError {
18 #[error("{0}: {1}")]
19 Crate(&'static str, String),
20
21 #[error("invalid address prefix: {0:?}")]
22 InvalidPrefix(Vec<u8>),
23
24 #[error("invalid version bytes: {0:?}")]
25 InvalidVersionBytes(Vec<u8>),
26
27 #[error("unsupported derivation path for the format: {0}")]
28 UnsupportedDerivationPath(String),
29}