pub struct BasicUsername(/* private fields */);Expand description
Owned Basic username with redacted diagnostics and drop-time cleanup.
Implementations§
Source§impl BasicUsername
impl BasicUsername
Sourcepub fn new(value: &str) -> Result<Self, BasicUsernameError>
pub fn new(value: &str) -> Result<Self, BasicUsernameError>
Validates and copies an immutable username.
Sourcepub fn from_mut_bytes(value: &mut [u8]) -> Result<Self, BasicUsernameError>
pub fn from_mut_bytes(value: &mut [u8]) -> Result<Self, BasicUsernameError>
Validates mutable input and clears the complete source on return.
Sourcepub fn from_secret_buffer(
value: SecretBuffer<'_>,
) -> Result<Self, BasicUsernameError>
pub fn from_secret_buffer( value: SecretBuffer<'_>, ) -> Result<Self, BasicUsernameError>
Consumes guarded input, which clears its complete source on return.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BasicUsername
impl RefUnwindSafe for BasicUsername
impl Send for BasicUsername
impl Sync for BasicUsername
impl Unpin for BasicUsername
impl UnsafeUnpin for BasicUsername
impl UnwindSafe for BasicUsername
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