Trait devtools::protocol::JsonPacketStream

source ·
pub trait JsonPacketStream {
    // Required methods
    fn write_json_packet<T: Serialize>(
        &mut self,
        obj: &T,
    ) -> Result<(), Box<dyn Error>>;
    fn write_merged_json_packet<T: Serialize, U: Serialize>(
        &mut self,
        base: &T,
        extra: &U,
    ) -> Result<(), Box<dyn Error>>;
    fn read_json_packet(&mut self) -> Result<Option<Value>, String>;
}

Required Methods§

source

fn write_json_packet<T: Serialize>( &mut self, obj: &T, ) -> Result<(), Box<dyn Error>>

source

fn write_merged_json_packet<T: Serialize, U: Serialize>( &mut self, base: &T, extra: &U, ) -> Result<(), Box<dyn Error>>

source

fn read_json_packet(&mut self) -> Result<Option<Value>, String>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl JsonPacketStream for TcpStream

source§

fn write_json_packet<T: Serialize>( &mut self, obj: &T, ) -> Result<(), Box<dyn Error>>

source§

fn write_merged_json_packet<T: Serialize, U: Serialize>( &mut self, base: &T, extra: &U, ) -> Result<(), Box<dyn Error>>

source§

fn read_json_packet(&mut self) -> Result<Option<Value>, String>

Implementors§