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§
Source§impl 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§
Source§impl<'de> Deserialize<'de> for Nonce264
impl<'de> Deserialize<'de> for Nonce264
Source§fn 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 StructuralPartialEq for Nonce264
Auto Trait Implementations§
impl Freeze for Nonce264
impl RefUnwindSafe for Nonce264
impl Send for Nonce264
impl Sync for Nonce264
impl Unpin for Nonce264
impl UnwindSafe for Nonce264
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.