Enum SolverMessage
pub enum SolverMessage {
SolverSpecCast {
spec: SolverSpec,
},
CreateSolverCast {
solver_id: u64,
random_seed: u64,
problem: ProblemSpec,
},
DropSolverCast {
solver_id: u64,
},
AskCall {
solver_id: u64,
next_trial_id: u64,
},
AskReply {
trial: NextTrial,
next_trial_id: u64,
},
TellCall {
solver_id: u64,
trial: EvaluatedTrial,
},
TellReply,
ErrorReply {
kind: ErrorKind,
message: Option<String>,
},
}Expand description
A message on the kurobako solver protocol.
A field-for-field mirror of kurobako_core::epi::solver::SolverMessage:
internally tagged on "type" in SCREAMING_SNAKE_CASE, every message on one
JSON line. The variants a solver sends and the ones it receives share one
enum because that is how the wire format is defined.
Variants§
SolverSpecCast
Sent once at startup: the solver’s specification.
Fields
§
spec: SolverSpecCreateSolverCast
Create a solver session for a problem, seeded by random_seed.
DropSolverCast
Drop a solver session.
AskCall
Ask for the next trial; next_trial_id is kurobako’s id counter.
AskReply
The asked trial, and the advanced id counter.
TellCall
Report an evaluated trial.
TellReply
Acknowledge a tell.
ErrorReply
Any failure, reported in place of the expected reply.
Trait Implementations§
§impl Clone for SolverMessage
impl Clone for SolverMessage
§fn clone(&self) -> SolverMessage
fn clone(&self) -> SolverMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SolverMessage
impl Debug for SolverMessage
§impl<'de> Deserialize<'de> for SolverMessage
impl<'de> Deserialize<'de> for SolverMessage
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for SolverMessage
impl Serialize for SolverMessage
Auto Trait Implementations§
impl Freeze for SolverMessage
impl RefUnwindSafe for SolverMessage
impl Send for SolverMessage
impl Sync for SolverMessage
impl Unpin for SolverMessage
impl UnsafeUnpin for SolverMessage
impl UnwindSafe for SolverMessage
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T, U> Imply<T> for U
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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