pub enum GgrsError {
PredictionThreshold,
InvalidRequest {
info: String,
},
MismatchedChecksum {
current_frame: Frame,
mismatched_frames: Vec<Frame>,
},
NotSynchronized,
SpectatorTooFarBehind,
NotEnoughData,
}Expand description
This enum contains all error messages this library can return. Most API functions will generally return a Result<(), GgrsError>.
Variants§
PredictionThreshold
When the prediction threshold has been reached, we cannot accept more inputs from the local player.
InvalidRequest
You made an invalid request, usually by using wrong parameters for function calls.
MismatchedChecksum
In a SyncTestSession, this error is returned if checksums of resimulated frames do not match up with the original checksum.
Fields
NotSynchronized
The Session is not synchronized yet. Please start the session and wait a few ms to let the clients synchronize.
SpectatorTooFarBehind
The spectator got so far behind the host that catching up is impossible.
NotEnoughData
Not enough data has been collected yet to compute the requested statistics.
This is returned by network_stats when less than one second has elapsed since the
connection was established. The session may already be Running; retry after a short delay.
Trait Implementations§
Source§impl Error for GgrsError
impl Error for GgrsError
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()