pub struct AnnounceKey(/* private fields */);Expand description
A 32-byte hex secret key supplied through configuration.
The value is held verbatim and is never printed: Debug redacts it, so a
logged ForgeConfig cannot leak the forge’s NIP-34 identity.
§Examples
use solid_pod_rs_forge::config::AnnounceKey;
let key = AnnounceKey::new("11".repeat(32));
assert!(!format!("{key:?}").contains("1111"));
assert_eq!(key.valid_hex(), Some("11".repeat(32)));
assert_eq!(AnnounceKey::new("not hex").valid_hex(), None);Implementations§
Source§impl AnnounceKey
impl AnnounceKey
Trait Implementations§
Source§impl Clone for AnnounceKey
impl Clone for AnnounceKey
Auto Trait Implementations§
impl Freeze for AnnounceKey
impl RefUnwindSafe for AnnounceKey
impl Send for AnnounceKey
impl Sync for AnnounceKey
impl Unpin for AnnounceKey
impl UnsafeUnpin for AnnounceKey
impl UnwindSafe for AnnounceKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more