#[non_exhaustive]pub enum RangeError {
InvalidWeight {
token: String,
},
WeightOutOfRange(f64),
NotAPair(String),
PairWithMarker(String),
InvalidMarker(String),
InvalidRank(char),
InvalidNotation(String),
}Expand description
Why a range spec or hand weight was rejected.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidWeight
A hand:weight token whose weight is not a number.
WeightOutOfRange(f64)
A weight that is not finite or lies outside 0.0..=1.0.
NotAPair(String)
Two different ranks without an s/o marker, e.g. AK.
PairWithMarker(String)
A pair with an s/o marker, e.g. AAs.
InvalidMarker(String)
A third character other than s or o.
InvalidRank(char)
A rank character other than 23456789TJQKA.
InvalidNotation(String)
Anything else that is not canonical hand notation.
Trait Implementations§
Source§impl Clone for RangeError
impl Clone for RangeError
Source§impl Debug for RangeError
impl Debug for RangeError
Source§impl Display for RangeError
impl Display for RangeError
Source§impl Error for RangeError
impl Error for RangeError
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()
Source§impl PartialEq for RangeError
impl PartialEq for RangeError
impl StructuralPartialEq for RangeError
Auto Trait Implementations§
impl Forget for RangeError
impl Freeze for RangeError
impl Move for RangeError
impl RefUnwindSafe for RangeError
impl Send for RangeErrorwhere
RawVecInner: Send,
impl Sync for RangeErrorwhere
RawVecInner: Sync,
impl Unpin for RangeError
impl UnsafeUnpin for RangeError
impl UnwindSafe for RangeErrorwhere
RawVecInner: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more