pub struct InviteSecret(/* private fields */);Expand description
An invitation secret: 32 random bytes, shown once. Never logged: Debug is redacted and
it has no Display. Zeroized on drop.
Implementations§
Source§impl InviteSecret
impl InviteSecret
Sourcepub const fn from_bytes(bytes: [u8; 32]) -> Self
pub const fn from_bytes(bytes: [u8; 32]) -> Self
Wraps raw bytes.
Sourcepub const fn expose(&self) -> &[u8; 32]
pub const fn expose(&self) -> &[u8; 32]
The raw bytes (for hashing before storage; hosts store only a hash).
Sourcepub fn expose_b64(&self) -> String
pub fn expose_b64(&self) -> String
Base64url, for the one place it is shown: the invitation link.
Trait Implementations§
Source§impl Clone for InviteSecret
impl Clone for InviteSecret
Source§fn clone(&self) -> InviteSecret
fn clone(&self) -> InviteSecret
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InviteSecret
impl Debug for InviteSecret
Source§impl<'de> Deserialize<'de> for InviteSecret
impl<'de> Deserialize<'de> for InviteSecret
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Drop for InviteSecret
impl Drop for InviteSecret
impl Eq for InviteSecret
Source§impl PartialEq for InviteSecret
impl PartialEq for InviteSecret
Source§impl Serialize for InviteSecret
impl Serialize for InviteSecret
impl StructuralPartialEq for InviteSecret
Auto Trait Implementations§
impl Freeze for InviteSecret
impl RefUnwindSafe for InviteSecret
impl Send for InviteSecret
impl Sync for InviteSecret
impl Unpin for InviteSecret
impl UnsafeUnpin for InviteSecret
impl UnwindSafe for InviteSecret
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