dominus

One damus client to rule them all
git clone git://jb55.com/dominus
Log | Files | Refs | README

error.rs (310B)


      1 #[derive(Eq, PartialEq, Debug)]
      2 pub enum Error {
      3     Nostr(enostr::Error),
      4     Generic(String),
      5 }
      6 
      7 impl From<String> for Error {
      8     fn from(s: String) -> Self {
      9         Error::Generic(s)
     10     }
     11 }
     12 
     13 impl From<enostr::Error> for Error {
     14     fn from(err: enostr::Error) -> Self {
     15         Error::Nostr(err)
     16     }
     17 }