Enum CombinatoricsError
pub enum CombinatoricsError {
KExceedsN {
n: u64,
k: u64,
},
FactorialOverflow(u64),
PermutationOverflow {
n: u64,
k: u64,
},
CombinationOverflow {
n: u64,
k: u64,
},
}Expand description
Errors returned by checked combinatorics helpers.
Variants§
KExceedsN
k must not exceed n in selection-style helpers.
FactorialOverflow(u64)
The factorial result overflowed u128.
PermutationOverflow
The permutation result overflowed u128.
CombinationOverflow
The combination result overflowed u128.
Trait Implementations§
§impl Clone for CombinatoricsError
impl Clone for CombinatoricsError
§fn clone(&self) -> CombinatoricsError
fn clone(&self) -> CombinatoricsError
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 more§impl Debug for CombinatoricsError
impl Debug for CombinatoricsError
§impl Display for CombinatoricsError
impl Display for CombinatoricsError
§impl Error for CombinatoricsError
impl Error for CombinatoricsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
§impl PartialEq for CombinatoricsError
impl PartialEq for CombinatoricsError
impl Copy for CombinatoricsError
impl Eq for CombinatoricsError
impl StructuralPartialEq for CombinatoricsError
Auto Trait Implementations§
impl Freeze for CombinatoricsError
impl RefUnwindSafe for CombinatoricsError
impl Send for CombinatoricsError
impl Sync for CombinatoricsError
impl Unpin for CombinatoricsError
impl UnsafeUnpin for CombinatoricsError
impl UnwindSafe for CombinatoricsError
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