pub struct Permutation<B = DefaultBuildHasher>where
B: BuildHasher,{ /* private fields */ }Expand description
An object of constructing random access permutations.
Implementations§
Source§impl<B> Permutation<B>where
B: BuildHasher,
impl<B> Permutation<B>where
B: BuildHasher,
Sourcepub fn new(n: u64, seed: u64, bob: B) -> Permutation<B>
pub fn new(n: u64, seed: u64, bob: B) -> Permutation<B>
Construct a new permutation over the range 0..n.
Sourcepub fn iter(&self) -> PermutationIterator<'_, B> ⓘ
pub fn iter(&self) -> PermutationIterator<'_, B> ⓘ
Construct an iterator over the entire permutation.
Auto Trait Implementations§
impl<B> Freeze for Permutation<B>where
B: Freeze,
impl<B> RefUnwindSafe for Permutation<B>where
B: RefUnwindSafe,
impl<B> Send for Permutation<B>where
B: Send,
impl<B> Sync for Permutation<B>where
B: Sync,
impl<B> Unpin for Permutation<B>where
B: Unpin,
impl<B> UnwindSafe for Permutation<B>where
B: UnwindSafe,
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