[][src]Trait i3ipc_types::I3IPC

pub trait I3IPC: Read + Write {
const MAGIC: &'static str;
    fn _encode_msg<P>(&self, msg: Msg, payload: Option<P>) -> Vec<u8>
    where
        P: AsRef<str>
, { ... }
fn encode_msg(&self, msg: Msg) -> Vec<u8> { ... }
fn encode_msg_body<P>(&self, msg: Msg, payload: P) -> Vec<u8>
    where
        P: AsRef<str>
, { ... }
fn encode_msg_json<P>(&self, msg: Msg, payload: P) -> Result<Vec<u8>>
    where
        P: Serialize
, { ... }
fn decode_event(evt_type: u32, payload: Vec<u8>) -> Result<Event> { ... }
fn decode_msg(&mut self) -> Result<(u32, Vec<u8>)> { ... } }

Trait containing methods to encode and decode message from i3

Associated Constants

const MAGIC: &'static str

Loading content...

Provided methods

fn _encode_msg<P>(&self, msg: Msg, payload: Option<P>) -> Vec<u8> where
    P: AsRef<str>, 

fn encode_msg(&self, msg: Msg) -> Vec<u8>

fn encode_msg_body<P>(&self, msg: Msg, payload: P) -> Vec<u8> where
    P: AsRef<str>, 

fn encode_msg_json<P>(&self, msg: Msg, payload: P) -> Result<Vec<u8>> where
    P: Serialize

fn decode_event(evt_type: u32, payload: Vec<u8>) -> Result<Event>

fn decode_msg(&mut self) -> Result<(u32, Vec<u8>)>

Loading content...

Implementors

impl<T: Read + Write> I3IPC for T[src]

const MAGIC: &'static str[src]

fn _encode_msg<P>(&self, msg: Msg, payload: Option<P>) -> Vec<u8> where
    P: AsRef<str>, 
[src]

fn encode_msg(&self, msg: Msg) -> Vec<u8>[src]

fn encode_msg_body<P>(&self, msg: Msg, payload: P) -> Vec<u8> where
    P: AsRef<str>, 
[src]

fn encode_msg_json<P>(&self, msg: Msg, payload: P) -> Result<Vec<u8>> where
    P: Serialize
[src]

fn decode_event(evt_type: u32, payload: Vec<u8>) -> Result<Event>[src]

fn decode_msg(&mut self) -> Result<(u32, Vec<u8>)>[src]

Loading content...