pub trait SyslogFormatter:
Debug
+ Send
+ Clone
+ From<String>
+ From<&'static str>
+ 'static {
// Required method
fn vsyslog1_format<'f>(
tap_type: TapType,
max_msg_size: usize,
pri: Priority,
progname: &'f str,
pid: &'f str,
fmt: &'f Self,
) -> SyslogFormatted<'f>;
}
Expand description
A trait for the custom syslog formatter.
Required Methods§
Sourcefn vsyslog1_format<'f>(
tap_type: TapType,
max_msg_size: usize,
pri: Priority,
progname: &'f str,
pid: &'f str,
fmt: &'f Self,
) -> SyslogFormatted<'f>
fn vsyslog1_format<'f>( tap_type: TapType, max_msg_size: usize, pri: Priority, progname: &'f str, pid: &'f str, fmt: &'f Self, ) -> SyslogFormatted<'f>
Formats the message for the syslog server with specific protocol or RFC.
§Arguments
-
tap_type
- TapType a type of the connection. -
max_msg_size
- a max msg size in bytes. -
pri
- a Priority a priority of the message. -
progname
- a program name or identifier which is set during init. -
pid
- a PID of the process. -
fmt
- generated message.
§Returns
A SyslogFormatted should be returned.
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.