pub struct UploadIdDist<const N: usize>;Expand description
Distribution for generating IDs of specific length
§Example
use human_friendly_ids::UploadIdDist;
use rand::{Rng, distr::Distribution};
let dist = UploadIdDist::<8>;
let id = dist.sample(&mut rand::thread_rng());Implementations§
Trait Implementations§
Source§impl<const N: usize> Clone for UploadIdDist<N>
impl<const N: usize> Clone for UploadIdDist<N>
Source§fn clone(&self) -> UploadIdDist<N>
fn clone(&self) -> UploadIdDist<N>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const N: usize> Debug for UploadIdDist<N>
impl<const N: usize> Debug for UploadIdDist<N>
Source§impl<const N: usize> Default for UploadIdDist<N>
impl<const N: usize> Default for UploadIdDist<N>
Source§impl<const N: usize> Distribution<UploadId> for UploadIdDist<N>
impl<const N: usize> Distribution<UploadId> for UploadIdDist<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for UploadIdDist<N>
impl<const N: usize> RefUnwindSafe for UploadIdDist<N>
impl<const N: usize> Send for UploadIdDist<N>
impl<const N: usize> Sync for UploadIdDist<N>
impl<const N: usize> Unpin for UploadIdDist<N>
impl<const N: usize> UnwindSafe for UploadIdDist<N>
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