Why Nostr? What is Njump?
2024-07-24 03:45:34

Dusty Pomerleau on Nostr: I have these #RustLang newtypes where I want the inner field private because of ...

I have these #RustLang newtypes where I want the inner field private because of checks in the `new()` constructor, but then later I wish I could pattern match to get the inner value, and the private field prevents that. Is there a pattern in Rust that allows some sort of "read-only public” visibility?
Author Public Key
npub1t007tscc3gj0wmhaxajgjvxc4k37gkykr5pm9cxkyktdfamwgauqjg5tp0