[][src]Trait thrustin::communication::Communication

pub trait Communication {
    fn read_message(&mut self) -> (u32, String);
fn send_message(&self, token: &u32, message: &str, state: &PlayerState);
fn send_message_from(
        &self,
        token: &u32,
        from: &str,
        bg: &str,
        fg: &str,
        message: &str,
        level: i32
    );
fn send_messages(
        &self,
        token: &u32,
        messages: &Vec<String>,
        state: &PlayerState
    );
fn disconnect(&mut self, token: &u32);
fn get_identifier(&self, token: &u32) -> String; }

Required methods

fn read_message(&mut self) -> (u32, String)

fn send_message(&self, token: &u32, message: &str, state: &PlayerState)

fn send_message_from(
    &self,
    token: &u32,
    from: &str,
    bg: &str,
    fg: &str,
    message: &str,
    level: i32
)

fn send_messages(
    &self,
    token: &u32,
    messages: &Vec<String>,
    state: &PlayerState
)

fn disconnect(&mut self, token: &u32)

fn get_identifier(&self, token: &u32) -> String

Loading content...

Trait Implementations

impl Debug for dyn Communication[src]

Implementors

impl Communication for ChannelCommunication[src]

impl Communication for WebSocketCommunication[src]

Loading content...