Struct carboncopy::Entry[][src]

pub struct Entry<T: Clone + Serialize> { /* fields omitted */ }

Represents a single log entry.

Implementations

impl<T: Clone + Serialize> Entry<T>[src]

pub fn new(
    message: T,
    timestamp: bool,
    span_id: Option<Vec<u8>>,
    tags: Option<Tags>
) -> Self
[src]

Creates a new log entry.

If timestamp is true, entry is timestamped at Utc::now(). Otherwise, entry is not timestamped. Use this option to avoid double timestamping (e.g when using Docker).

When processing the log using a third party log processor, span_id may be used to group entries related to the same event together, while tags may be used to add labels for categorization.

pub fn json(self, level: Level) -> String[src]

Trait Implementations

impl<T: Clone + Serialize> Clone for Entry<T>[src]

impl<T: Clone + Serialize> Serialize for Entry<T> where
    T: Serialize
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Entry<T> where
    T: RefUnwindSafe

impl<T> Send for Entry<T> where
    T: Send

impl<T> Sync for Entry<T> where
    T: Sync

impl<T> Unpin for Entry<T> where
    T: Unpin

impl<T> UnwindSafe for Entry<T> where
    T: UnwindSafe

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> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.