pub trait PlayConnection: Send {
// Required methods
fn session_id(&self) -> SessionId;
fn entity_id(&self) -> EntityId;
fn submit_intent<'life0, 'async_trait>(
&'life0 self,
intent: Intent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn try_next_event(&mut self) -> Option<SessionEvent>;
fn next_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<SessionEvent>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn disconnect(&self);
}Expand description
Gameplay session handle (remote TCP or in-process worker).
Required Methods§
fn session_id(&self) -> SessionId
fn entity_id(&self) -> EntityId
fn submit_intent<'life0, 'async_trait>(
&'life0 self,
intent: Intent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn try_next_event(&mut self) -> Option<SessionEvent>
fn next_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<SessionEvent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn disconnect(&self)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".