Struct structlog::event::Event[][src]

pub struct Event {
    pub created: DateTime<Utc>,
    // some fields omitted
}

Simple event to record to the output channel.

Fields

created: DateTime<Utc>

Implementations

impl Event[src]

pub fn new() -> Event[src]

pub fn add_field(&mut self, key: String, value: String) -> &mut Self[src]

Chainable method to add a key:value pair into the event payload. This enables the event to be enriched at multiple points during an operation to enable a better understanding of the state of things at the time of the event.

pub fn info(self) -> Event[src]

pub fn debug(self) -> Event[src]

pub fn warn(self) -> Event[src]

pub fn error(self) -> Event[src]

Trait Implementations

impl Debug for Event[src]

impl<'de> Deserialize<'de> for Event[src]

impl Display for Event[src]

impl From<&'_ str> for Event[src]

impl From<Box<dyn Error + 'static, Global>> for Event[src]

impl FromStr for Event[src]

type Err = ParseEventError

The associated error which can be returned from parsing.

impl Serialize for Event[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.