Skip to main content

Session

Trait Session 

Source
pub trait Session<G: Game> {
    // Required method
    fn submit(
        &mut self,
        player: PlayerId,
        request: Request<G::Action>,
    ) -> Response<G::View>;
}
Expand description

A running game, reachable in-process or (later) over a transport.

Required Methods§

Source

fn submit( &mut self, player: PlayerId, request: Request<G::Action>, ) -> Response<G::View>

Applies request on behalf of player and returns the response.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<G: Game> Session<G> for LocalSession<G>