pub enum DistinctDrawError {
RequestTooLarge {
requested: usize,
},
OutputTooSmall {
required: usize,
provided: usize,
},
SampleBudgetTooLarge {
sample_budget: usize,
},
}Expand description
Preflight failures: neither caller output nor RNG is changed.
See RewardTable::roll_distinct_into for precedence and a usage example.
Variants§
RequestTooLarge
requested exceeds MAX_DISTINCT_DRAWS.
OutputTooSmall
Output cannot hold min(requested, positive_weight_entries) indices.
SampleBudgetTooLarge
sample_budget exceeds MAX_DISTINCT_SAMPLES. Zero is valid.
Trait Implementations§
Source§impl Clone for DistinctDrawError
impl Clone for DistinctDrawError
Source§fn clone(&self) -> DistinctDrawError
fn clone(&self) -> DistinctDrawError
Returns a duplicate 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 Debug for DistinctDrawError
impl Debug for DistinctDrawError
Source§impl PartialEq for DistinctDrawError
impl PartialEq for DistinctDrawError
impl Copy for DistinctDrawError
impl Eq for DistinctDrawError
impl StructuralPartialEq for DistinctDrawError
Auto Trait Implementations§
impl Freeze for DistinctDrawError
impl RefUnwindSafe for DistinctDrawError
impl Send for DistinctDrawError
impl Sync for DistinctDrawError
impl Unpin for DistinctDrawError
impl UnwindSafe for DistinctDrawError
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