What is Nostr?
janis / Janis
npub1mfm…27pu
2023-12-29 15:38:43
in reply to nevent1q…7jxs

janis on Nostr: Yes, exactly! Rust lets you encode a lot more into your types than what you would ...

Yes, exactly! Rust lets you encode a lot more into your types than what you would normally be used to in other languages.

Regarding errors, if there’s semantic meaning attached to the negative ints in the API, you might want to have an Error type that captures that meaning on Rust side. Look into the thiserror crate that lets you easily spin up custom error types.
Author Public Key
npub1mfmpks2n5xzymsp665zlczx3yh2tkp2d0n62flsxmc7lw7j9lkzsxv27pu