Trait SyslogQueueChanSnd

Source
pub trait SyslogQueueChanSnd<F: SyslogFormatter, D: SyslogDestination, S: SyslogQueueChannel<F, D>>: Debug + Clone {
    // Required method
    fn q_send_blocking(&self, msg: SyCmd<F, D, S>) -> SyRes<()>;

    // Provided method
    async fn q_send(&self, _msg: SyCmd<F, D, S>) -> SyRes<()> { ... }
}
Expand description

A trait which should be implemented by the channel provider which forms a command queue. This trait provides both or either the blocking send interface.

Required Methods§

Source

fn q_send_blocking(&self, msg: SyCmd<F, D, S>) -> SyRes<()>

Sends the message over the channel in blocking mode.

Provided Methods§

Source

async fn q_send(&self, _msg: SyCmd<F, D, S>) -> SyRes<()>

Sends the message over the channel in async mode. By default, it returns error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<F: SyslogFormatter, D: SyslogDestination, S: SyslogQueueChannel<F, D>> SyslogQueueChanSnd<F, D, S> for UnboundedSender<SyCmd<F, D, S>>

Source§

fn q_send_blocking(&self, msg: SyCmd<F, D, S>) -> SyRes<()>

Source§

async fn q_send(&self, msg: SyCmd<F, D, S>) -> SyRes<()>

Implementors§