Skip to main content

Module extract

Module extract 

Source
Expand description

Practical types used in the ygopro message flow.

This module provides the request/response machinery that handlers use to extract their parameters and to produce a response.

Due to Rust’s orphan rule and impl-conflict limitations, only the following FromRequest implementations are provided. Names in <> are the free type variables of each impl.

Blanket impls:

Extracted typeSource
Extra (SocketAddr, Netplayer, CorePlayer, usize, u8, u32)Request<Message, Extra>
&MessageRequest<Message, Extra>
&mut Bundle<Req, State, Res>Bundle<Req, State, Res>
&mut Response<Message>Bundle<Req, State, Response<Message>>
&mut StopFlagBundle<Req, State, Res>
&mut Box<dyn Any + Send>Bundle<Box<dyn Any + Send>, State, Res>
&mut anymapBundle<Req, State, Res> (requires State: ContainsMapMut)

Per-variant impls (generated for every message variant of ctos::, stoc:: and gm::, which are treated equally; one example per family):

Extracted typeSource
&ctos::JoinGameRequest<ctos::Message, Extra> / ctos::Message
&stoc::JoinGameRequest<stoc::Message, Extra> / stoc::Message
&gm::MoveRequest<gm::Message, Extra> / gm::Message
&ctos::JoinGameRequest<Complex<ctos::Message>, Extra> / Complex<ctos::Message>
&stoc::JoinGameRequest<Complex<stoc::Message>, Extra> / Complex<stoc::Message>
&gm::MoveRequest<Complex<gm::Message>, Extra> / Complex<gm::Message>
&gm::MoveRequest<Complex<stoc::Message>, Extra> / Complex<stoc::Message>

Structs§

Request
A request carrying a message and an extra message.

Enums§

Response
An enum conforming to the ygopro data flow.

Traits§

ContainsMap
A state that exposes an anymap by shared reference.
ContainsMapMut
A state that exposes an anymap by mutable reference.