Struct json_digest::Nonce264
source · [−]pub struct Nonce264(pub String);
Expand description
Multibase-encoded random content, e.g. “urvU8F6HmEol5zOmHh_nnS1RiX5r3T2t9U_d_kQY7ZC-I”
The amount of entropy is chosen as 264 bits to end up with full digits in the base64 encoding used.
Tuple Fields
0: String
Implementations
sourceimpl Nonce264
impl Nonce264
sourcepub fn generate() -> Self
pub fn generate() -> Self
Generates a new Nonce264
. Uses the getrandom
crate to find the best source of entropy on the platform.
In JavaScript tests you might need to refer to https://github.com/jsdom/jsdom/issues/1612 for
how to fix phantom browsers to comply with HTML5 specs.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Nonce264
impl<'de> Deserialize<'de> for Nonce264
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Nonce264
impl StructuralEq for Nonce264
impl StructuralPartialEq for Nonce264
Auto Trait Implementations
impl RefUnwindSafe for Nonce264
impl Send for Nonce264
impl Sync for Nonce264
impl Unpin for Nonce264
impl UnwindSafe for Nonce264
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.