#[non_exhaustive]pub enum Error {
BinaryUnavailable(String),
Handshake(String),
SessionEnded {
diagnostics: Option<Diagnostics>,
},
Protocol(String),
Refused {
code: String,
message: String,
},
TurnInProgress,
SlowConsumer,
TooLarge,
}Expand description
What went wrong with a session.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
No harness binary could be found or obtained (R12).
Handshake(String)
The session did not start: no init in time, or one this SDK cannot
speak to (R6.2). The text names what arrived.
SessionEnded
The session ended without being asked to.
Fields
diagnostics: Option<Diagnostics>What the backend could say about the end, when it has anything.
Protocol(String)
A line from the session that is not JSON, or misses a field its type requires (R6.3).
Refused
The session refused a command, or the options it was started with:
the protocol’s error code and its message.
Fields
TurnInProgress
A turn is still running: one turn at a time, until its result.
SlowConsumer
The program left more than 10,000 events of a turn unread; the session was ended rather than stop reading (R8.5.5).
TooLarge
The command does not fit the session’s 8 MiB line limit (R8.5.2).
Trait Implementations§
impl Eq for Error
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()