#[non_exhaustive]pub struct AccountName(/* private fields */);Expand description
The human-readable account name (RFC 8620 §2 name field on the
per-account object).
Typically the owner’s email address, and therefore PII. Shape
mirrors Username; see that type for the PII-handling rationale.
Implementations§
Source§impl AccountName
impl AccountName
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Wrap a string as an AccountName.
Sourcepub fn expose_unredacted(&self) -> &str
pub fn expose_unredacted(&self) -> &str
Return the raw, un-redacted account name. Same handling
guidance as Username::expose_unredacted.
Sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consume the wrapper and return the inner String. Same
handling guidance as Username::into_inner.
Trait Implementations§
Source§impl Clone for AccountName
impl Clone for AccountName
Source§fn clone(&self) -> AccountName
fn clone(&self) -> AccountName
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 AccountName
impl Debug for AccountName
Source§impl<'de> Deserialize<'de> for AccountName
impl<'de> Deserialize<'de> for AccountName
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
Source§impl Display for AccountName
impl Display for AccountName
impl Eq for AccountName
Source§impl Hash for AccountName
impl Hash for AccountName
Source§impl PartialEq for AccountName
impl PartialEq for AccountName
Source§fn eq(&self, other: &AccountName) -> bool
fn eq(&self, other: &AccountName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialEq<&str> for AccountName
impl PartialEq<&str> for AccountName
Source§impl PartialEq<AccountName> for &str
impl PartialEq<AccountName> for &str
Source§fn eq(&self, other: &AccountName) -> bool
fn eq(&self, other: &AccountName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialEq<AccountName> for str
impl PartialEq<AccountName> for str
Source§fn eq(&self, other: &AccountName) -> bool
fn eq(&self, other: &AccountName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialEq<str> for AccountName
impl PartialEq<str> for AccountName
Source§impl Serialize for AccountName
impl Serialize for AccountName
impl StructuralPartialEq for AccountName
Auto Trait Implementations§
impl Freeze for AccountName
impl RefUnwindSafe for AccountName
impl Send for AccountName
impl Sync for AccountName
impl Unpin for AccountName
impl UnsafeUnpin for AccountName
impl UnwindSafe for AccountName
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.