pub struct ChallengeId(/* private fields */);Expand description
The identifier of a single-use challenge, written as 32 lowercase hex digits.
This crate performs no I/O, so the caller supplies the 16 bytes; they must come from a cryptographically secure random source.
§Examples
use stratum_node_core::ChallengeId;
let id = ChallengeId::from_bytes([7; 16]);
assert_eq!(id.to_string().parse::<ChallengeId>()?, id);Implementations§
Trait Implementations§
Source§impl Clone for ChallengeId
impl Clone for ChallengeId
impl Copy for ChallengeId
Source§impl Debug for ChallengeId
impl Debug for ChallengeId
Source§impl<'de> Deserialize<'de> for ChallengeId
impl<'de> Deserialize<'de> for ChallengeId
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ChallengeId
impl Display for ChallengeId
impl Eq for ChallengeId
Source§impl FromStr for ChallengeId
impl FromStr for ChallengeId
Source§impl Hash for ChallengeId
impl Hash for ChallengeId
Source§impl Ord for ChallengeId
impl Ord for ChallengeId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ChallengeId
impl PartialEq for ChallengeId
Source§impl PartialOrd for ChallengeId
impl PartialOrd for ChallengeId
Source§impl Serialize for ChallengeId
impl Serialize for ChallengeId
impl StructuralPartialEq for ChallengeId
Auto Trait Implementations§
impl Forget for ChallengeId
impl Freeze for ChallengeId
impl Move for ChallengeId
impl RefUnwindSafe for ChallengeId
impl Send for ChallengeId
impl Sync for ChallengeId
impl Unpin for ChallengeId
impl UnsafeUnpin for ChallengeId
impl UnwindSafe for ChallengeId
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