Trait shess::Backend[][src]

pub trait Backend {
    type Id;
    fn new() -> Self;
fn receive(&mut self) -> Result<Option<String>, String>;
fn send(&mut self, msg: String) -> Result<Option<String>, String>;
fn player_to_backend(&self, id: i32) -> Self::Id;
fn backend_to_player(&self, id: Self::Id) -> i32; }

Associated Types

type Id[src]

Loading content...

Required methods

fn new() -> Self[src]

fn receive(&mut self) -> Result<Option<String>, String>[src]

fn send(&mut self, msg: String) -> Result<Option<String>, String>[src]

fn player_to_backend(&self, id: i32) -> Self::Id[src]

fn backend_to_player(&self, id: Self::Id) -> i32[src]

Loading content...

Implementors

Loading content...