pub enum Request {
Quit,
Ping(u32),
GetConfig,
SetConfig(Config),
GetPlaylist,
DropPlaylistItem(String),
ClearPlaylist,
CreateLobby,
AddToLobby(GameId, String),
StartGame(GameId),
}
Expand description
Request to the client, always gets a Response Currently client identifiers are string containg the peer address and port
Variants§
Quit
Shut down the proxy
Ping(u32)
Check that the system is up and synchronized
GetConfig
Read current server configuration
SetConfig(Config)
Update configuration for the new games
GetPlaylist
Get identifiers and ready statuses of all clients in the playlist
DropPlaylistItem(String)
Remove a client from the playlist by identifier
ClearPlaylist
Remove all clients from the playlist
CreateLobby
Creates a new lobby with given players
AddToLobby(GameId, String)
Moves player from the playlist to a lobby by identifier
StartGame(GameId)
Starts a game from lobby
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
Source§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 StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)