Trait htrpc::RpcResponse

source ·
pub trait RpcResponse: Serialize + for<'a> Deserialize<'a> {
    // Required methods
    fn body(&mut self) -> Box<dyn AsRef<[u8]> + Send + 'static>;
    fn set_body(&mut self, body: Vec<u8>);
}
Expand description

RPC Response.

Implementations of this trait have to follow conventions as follows.

Required Methods§

source

fn body(&mut self) -> Box<dyn AsRef<[u8]> + Send + 'static>

Returns the body of this HTTP response.

source

fn set_body(&mut self, body: Vec<u8>)

Sets the body of this HTTP response.

Implementors§