gn_communicator

Trait Communicator

Source
pub trait Communicator
where Self: Sized,
{
Show 13 methods // Required methods async fn on_match_abrupt_close<F, Fut>(&self, callback: F) where F: MessageHandler<MatchAbrubtClose, Fut>, Fut: Future<Output = ()> + Send + Sync + 'static; async fn on_match_result<F, Fut>(&self, callback: F) where F: MessageHandler<MatchResult, Fut>, Fut: Future<Output = ()> + Send + Sync + 'static; async fn on_match_created<F, Fut>(&self, callback: F) where F: MessageHandler<CreatedMatch, Fut>, Fut: Future<Output = ()> + Send + Sync + 'static; async fn on_game_create<F, Fut>(&self, callback: F) where F: MessageHandler<GameServerCreate, Fut>, Fut: Future<Output = String> + Send + Sync + 'static; async fn on_health_check<F, Fut>(&self, callback: F) where F: MessageHandler<String, Fut>, Fut: Future<Output = ()> + Send + Sync + 'static; async fn on_match_create<F, Fut>(&self, callback: F) where F: MessageHandler<CreateMatch, Fut>, Fut: Future<Output = ()> + Send + Sync + 'static; async fn create_game( &self, game_server: &GameServerCreate, ) -> Result<String, Box<dyn Error>>; async fn send_health_check(&self, client_id: String); async fn create_match(&self, match_request: &CreateMatch); async fn report_match_created(&self, created_match: &CreatedMatch); async fn report_match_result(&self, match_result: &MatchResult); async fn report_match_abrupt_close(&self, match_close: &MatchAbrubtClose); async fn create_ai_task(&self, task: &Task);
}

Required Methods§

Source

async fn on_match_abrupt_close<F, Fut>(&self, callback: F)
where F: MessageHandler<MatchAbrubtClose, Fut>, Fut: Future<Output = ()> + Send + Sync + 'static,

Source

async fn on_match_result<F, Fut>(&self, callback: F)
where F: MessageHandler<MatchResult, Fut>, Fut: Future<Output = ()> + Send + Sync + 'static,

Source

async fn on_match_created<F, Fut>(&self, callback: F)
where F: MessageHandler<CreatedMatch, Fut>, Fut: Future<Output = ()> + Send + Sync + 'static,

Source

async fn on_game_create<F, Fut>(&self, callback: F)
where F: MessageHandler<GameServerCreate, Fut>, Fut: Future<Output = String> + Send + Sync + 'static,

Source

async fn on_health_check<F, Fut>(&self, callback: F)
where F: MessageHandler<String, Fut>, Fut: Future<Output = ()> + Send + Sync + 'static,

Source

async fn on_match_create<F, Fut>(&self, callback: F)
where F: MessageHandler<CreateMatch, Fut>, Fut: Future<Output = ()> + Send + Sync + 'static,

Source

async fn create_game( &self, game_server: &GameServerCreate, ) -> Result<String, Box<dyn Error>>

Source

async fn send_health_check(&self, client_id: String)

Source

async fn create_match(&self, match_request: &CreateMatch)

Source

async fn report_match_created(&self, created_match: &CreatedMatch)

Source

async fn report_match_result(&self, match_result: &MatchResult)

Source

async fn report_match_abrupt_close(&self, match_close: &MatchAbrubtClose)

Source

async fn create_ai_task(&self, task: &Task)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§