Struct syslog::Formatter5424
source · pub struct Formatter5424 {
pub facility: Facility,
pub hostname: Option<String>,
pub process: String,
pub pid: u32,
}
Fields§
§facility: Facility
§hostname: Option<String>
§process: String
§pid: u32
Implementations§
Trait Implementations§
source§impl Clone for Formatter5424
impl Clone for Formatter5424
source§fn clone(&self) -> Formatter5424
fn clone(&self) -> Formatter5424
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Formatter5424
impl Debug for Formatter5424
source§impl Default for Formatter5424
impl Default for Formatter5424
source§fn default() -> Self
fn default() -> Self
Returns a Formatter5424
with default settings.
The default settings are as follows:
facility
:LOG_USER
, as specified by POSIX.hostname
: Automatically detected using thehostname
crate, if possible.process
: Automatically detected usingstd::env::current_exe
, or if that fails, an empty string.pid
: Automatically detected usinglibc::getpid
.
source§impl<T: Display> LogFormat<(u32, HashMap<String, HashMap<String, String>>, T)> for Formatter5424
impl<T: Display> LogFormat<(u32, HashMap<String, HashMap<String, String>>, T)> for Formatter5424
fn format<W: Write>( &self, w: &mut W, severity: Severity, log_message: (u32, HashMap<String, HashMap<String, String>>, T) ) -> Result<()>
fn emerg<W: Write>(&mut self, w: &mut W, message: T) -> Result<()>
fn alert<W: Write>(&mut self, w: &mut W, message: T) -> Result<()>
fn crit<W: Write>(&mut self, w: &mut W, message: T) -> Result<()>
fn err<W: Write>(&mut self, w: &mut W, message: T) -> Result<()>
fn warning<W: Write>(&mut self, w: &mut W, message: T) -> Result<()>
fn notice<W: Write>(&mut self, w: &mut W, message: T) -> Result<()>
fn info<W: Write>(&mut self, w: &mut W, message: T) -> Result<()>
fn debug<W: Write>(&mut self, w: &mut W, message: T) -> Result<()>
Auto Trait Implementations§
impl Freeze for Formatter5424
impl RefUnwindSafe for Formatter5424
impl Send for Formatter5424
impl Sync for Formatter5424
impl Unpin for Formatter5424
impl UnwindSafe for Formatter5424
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more