Enum dds_bridge::solver::Error
source · #[repr(i32)]pub enum Error {
Show 27 variants
Success = 1,
UnknownFault = -1,
ZeroCards = -2,
TargetTooHigh = -3,
DuplicateCards = -4,
NegativeTarget = -5,
InvalidTarget = -7,
LowSolvingParameter = -8,
HighSolvingParameter = -9,
TooManyCards = -10,
CurrentSuitOrRank = -12,
PlayedCard = -13,
CardCount = -14,
ThreadIndex = -15,
NegativeModeParameter = -16,
HighModeParameter = -17,
Trump = -18,
First = -19,
AnalysePlay = -98,
PBN = -99,
TooManyBoards = -101,
ThreadCreate = -102,
ThreadWait = -103,
ThreadMissing = -104,
NoSuit = -201,
TooManyTables = -202,
ChunkSize = -301,
}Expand description
Errors that can occur in the solver
Variants§
Success = 1
Success, no error
UnknownFault = -1
A general or unknown error
ZeroCards = -2
Zero cards
TargetTooHigh = -3
Target exceeds number of tricks
DuplicateCards = -4
Duplicate cards
NegativeTarget = -5
Target tricks < 0
InvalidTarget = -7
Target tricks > 13
LowSolvingParameter = -8
Solving parameter < 1
HighSolvingParameter = -9
Solving parameter > 3
TooManyCards = -10
Too many cards
CurrentSuitOrRank = -12
Wrong current suit or rank
PlayedCard = -13
Wrong played card
CardCount = -14
Wrong card count
ThreadIndex = -15
Wrong thread index
NegativeModeParameter = -16
Mode parameter < 0
HighModeParameter = -17
Mode parameter > 2
Trump = -18
Wrong trump suit
First = -19
Wrong “first”
AnalysePlay = -98
AnalysePlay*() family of functions.
(a) Less than 0 or more than 52 cards supplied.
(b) Invalid suit or rank supplied.
(c) A played card is not held by the right player.
PBN = -99
Invalid PBN
TooManyBoards = -101
Too many boards
ThreadCreate = -102
Cannot create a new thread
ThreadWait = -103
Failed to wait for a thread
ThreadMissing = -104
Missing threading system
NoSuit = -201
No suit to solve
TooManyTables = -202
Too many tables
ChunkSize = -301
Invalid chunk size
Implementations§
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 Error
impl PartialEq for Error
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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