[][src]Struct stakker_log::KvSingleLine

pub struct KvSingleLine<'a> { /* fields omitted */ }

Single-line rendering of key-value pairs

When formatted with "{}", this produces a human-readable single-line rendering of the key-value pairs. It is good for debugging or simple display, or for input into human-readable string-based processing. All type information on key values is lost. Strings are shown without quotes if no characters need quoting. Simple \XX escaping is used for reserved ASCII characters, where XX is two hex digits. Anything higher than ASCII is passed unchanged. Arrays are enclosed in [...] and maps are enclosed in {...}.

Implementations

impl<'a> KvSingleLine<'a>[src]

pub fn new(
    kvscan: &'a dyn Fn(&mut dyn LogVisitor),
    prefix: &'static str,
    suffix: &'static str
) -> Self
[src]

Create a KvSingleLine ready to be formatted. prefix and suffix are two strings which are output before and after the key-value pairs, but only if the list of key-value pairs is non-empty.

Trait Implementations

impl<'a> Display for KvSingleLine<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for KvSingleLine<'a>[src]

impl<'a> !Send for KvSingleLine<'a>[src]

impl<'a> !Sync for KvSingleLine<'a>[src]

impl<'a> Unpin for KvSingleLine<'a>[src]

impl<'a> !UnwindSafe for KvSingleLine<'a>[src]

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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> 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.