Add strict typing for Usernames #318

Merged
parabitdev merged 5 commits from parabit/username-typing into master 2025-12-17 15:21:08 +00:00
parabitdev commented 2025-12-16 00:16:40 +00:00 (Migrated from github.com)
  • closes #312
    • StratumError::Unauthorized is returned for failure to parse, wrong network, etc.
    • Add good error messages in Username to facilitate a nice human-readable response object
  • closes #315
    • Add From<>s where appropriate to enable easy usage of into() for type coercion
  • closes #316
    • Constructors and From<String> and From<&str> to enable easily creating object from provided username
    • Allow fetching workername with getter
    • Allow fetching bitcoin address either unchecked or forcing a specific network
  • Testing/Documentation
- [x] closes #312 - [x] StratumError::Unauthorized is returned for failure to parse, wrong network, etc. - [x] Add good error messages in Username to facilitate a nice human-readable response object - [x] closes #315 - [x] Add `From<>`s where appropriate to enable easy usage of into() for type coercion - [x] closes #316 - [x] Constructors and `From<String> and From<&str>` to enable easily creating object from provided username - [x] Allow fetching workername with getter - [x] Allow fetching bitcoin address either unchecked or forcing a specific network - [x] Testing/Documentation
Sign in to join this conversation.
No description provided.