pub struct Characters { /* private fields */ }Expand description
Characters of a set with their weights, stored for choosing one of them.
This is a list of ranges of characters that have the same weight, in the order of their codepoints. The order decides which character a random number stands for, so it must stay like this: a set is its characters in the order of their codepoints, each as many times as it is listed.
Every range knows the total of the weights up to its end, so that a character is found with a binary search, however many characters the ranges have.
Implementations§
Trait Implementations§
Source§impl Clone for Characters
impl Clone for Characters
Source§impl Debug for Characters
impl Debug for Characters
Source§impl Default for Characters
impl Default for Characters
impl Eq for Characters
Source§impl PartialEq for Characters
impl PartialEq for Characters
impl StructuralPartialEq for Characters
Auto Trait Implementations§
impl Forget for Characters
impl Freeze for Characters
impl Move for Characters
impl RefUnwindSafe for Characters
impl Send for Characters
impl Sync for Characters
impl Unpin for Characters
impl UnsafeUnpin for Characters
impl UnwindSafe for Characters
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.