Enum ggrs::GGRSError [−][src]
pub enum GGRSError { InvalidHandle, PredictionThreshold, InvalidRequest { info: String, }, MismatchedChecksum { frame: Frame, }, SocketCreationFailed, NotSynchronized, PlayerDisconnected, SpectatorTooFarBehind, }
Expand description
This enum contains all error messages this library can return. Most API functions will generally return a Result<(),GGRSError>
.
Variants
The given player handle was invalid. Usually this indicates you passed a player handle >= num_players.
When the prediction threshold has been reached, we cannot accept more inputs from the local player.
You made an invalid request, usually by using wrong parameters for function calls or starting a session that is already started.
Fields of InvalidRequest
info: String
In a SyncTestSession
, this error is returned if checksums of resimulated frames do not match up with the original checksum.
Fields of MismatchedChecksum
frame: Frame
A problem occured during creation of the UDP socket.
The Session is not synchronized yet. Please start the session and wait a few ms to let the clients synchronize.
The player you are trying to disconnect is already disconnected.
The spectator got so far behind the host that catching up is impossible.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GGRSError
impl UnwindSafe for GGRSError
Blanket Implementations
pub fn as_fail(&self) -> &(dyn Fail + 'static)
pub fn as_fail(&self) -> &(dyn Fail + 'static)
Converts a reference to Self
into a dynamic trait object of Fail
.
Mutably borrows from an owned value. Read more