#[non_exhaustive]pub enum MetaCommand {
Game {
name: Option<String>,
turn: Option<TurnPreference>,
},
Challenge {
name: String,
turn: TurnPreference,
},
Who,
List,
Show(String),
Chat(String),
Rating,
Version,
Help,
Other {
name: String,
args: Vec<String>,
},
}Expand description
A %%-prefixed administrative command.
Only the commands the client flow needs are typed. Everything else round-trips
through MetaCommand::Other rather than growing a variant per server dialect.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Game
%%GAME, %%GAME <name>, or %%GAME <name> <turn>.
The bare form cancels an outstanding game request.
Fields
§
turn: Option<TurnPreference>The requested turn.
Challenge
%%CHALLENGE <name> <turn>.
Who
%%WHO
List
%%LIST
Show(String)
%%SHOW <game_id>
Chat(String)
%%CHAT <message>
Rating
%%RATING
Version
%%VERSION
Help
%%HELP
Other
Any other %% command. name excludes the leading %%.
Trait Implementations§
Source§impl Clone for MetaCommand
impl Clone for MetaCommand
Source§impl Debug for MetaCommand
impl Debug for MetaCommand
impl Eq for MetaCommand
Source§impl PartialEq for MetaCommand
impl PartialEq for MetaCommand
impl StructuralPartialEq for MetaCommand
Auto Trait Implementations§
impl Forget for MetaCommand
impl Freeze for MetaCommand
impl RefUnwindSafe for MetaCommand
impl Send for MetaCommand
impl Sync for MetaCommand
impl Unpin for MetaCommand
impl UnsafeUnpin for MetaCommand
impl UnwindSafe for MetaCommand
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