pub struct RandomString { /* private fields */ }Expand description
Generates an alphanumeric string from entropy bytes.
The output length defaults to 16 characters but can be configured.
Characters are drawn from [a-zA-Z0-9].
Implementations§
Source§impl RandomString
impl RandomString
Sourcepub fn with_length(len: usize) -> Self
pub fn with_length(len: usize) -> Self
Create with a specific output length (clamped to 1..=64).
Trait Implementations§
Source§impl Default for RandomString
impl Default for RandomString
Auto Trait Implementations§
impl Freeze for RandomString
impl RefUnwindSafe for RandomString
impl Send for RandomString
impl Sync for RandomString
impl Unpin for RandomString
impl UnsafeUnpin for RandomString
impl UnwindSafe for RandomString
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