SyStreamApi

Trait SyStreamApi 

Source
pub trait SyStreamApi<'stream, F: SyslogFormatter, D: SyslogDestination, S: SyslogApi<F, D>> {
    // Required method
    fn stream(&'stream self, pri: Priority) -> SyStream<'stream, D, F, S>;
}
Expand description

A standart trait which provides the access to the instance which implements std::fmt::Write.

The syslog requres the Priority of the message to be specified. The Write does not allow to provide additional arguments. For this reason, a function stream borrows the current syslog instance and stores the Priority which will be used later.

Required Methods§

Source

fn stream(&'stream self, pri: Priority) -> SyStream<'stream, D, F, S>

Creates the temporary structure which holds the Priority and implements std::fmt::Write. A SyStream is returned which can be used directly with write.

write!(SYSLOG.stream(Priority::LOG_DEBUG),

Implementors§

Source§

impl<'stream, F: SyslogFormatter, D: SyslogDestination> SyStreamApi<'stream, F, D, SyncSyslog<F, D>> for SyncSyslog<F, D>

Source§

impl<'stream, F: SyslogFormatter, D: SyslogDestination> SyStreamApi<'stream, F, D, SingleSyslog<F, D>> for SingleSyslog<F, D>

Source§

impl<'stream, F: SyslogFormatter, D: SyslogDestination, S: SyslogQueueChannel<F, D>> SyStreamApi<'stream, F, D, QueuedSyslog<S, F, D>> for QueuedSyslog<S, F, D>