pub trait RedirectableStdout {
    // Required method
    fn sender(&self) -> Option<&Sender<Value>>;

    // Provided methods
    fn send_stdout<T: ?Sized + Serialize>(&self, message: &T) -> Result<()> { ... }
    fn send_log<S: Into<String>>(&self, msg: S) -> Result<()> { ... }
    fn send_info<S: Into<String>>(&self, msg: S) -> Result<()> { ... }
    fn send_error_info<S: Into<String>>(&self, msg: S) -> Result<()> { ... }
    fn send_error<S: Into<String>>(
        &self,
        id: Option<i64>,
        code: i64,
        msg: S
    ) -> Result<()> { ... }
    fn send_invalid_req_error(&self) -> Result<()> { ... }
}
Expand description

Servers implementing this must return output with the send_* method provided by this trait.

Required Methods§

Provided Methods§

source

fn send_stdout<T: ?Sized + Serialize>(&self, message: &T) -> Result<()>

source

fn send_log<S: Into<String>>(&self, msg: S) -> Result<()>

source

fn send_info<S: Into<String>>(&self, msg: S) -> Result<()>

source

fn send_error_info<S: Into<String>>(&self, msg: S) -> Result<()>

source

fn send_error<S: Into<String>>( &self, id: Option<i64>, code: i64, msg: S ) -> Result<()>

source

fn send_invalid_req_error(&self) -> Result<()>

Object Safety§

This trait is not object safe.

Implementors§