Struct slog::OwnedKeyValueList [] [src]

pub struct OwnedKeyValueList { /* fields omitted */ }

Chain of SyncMultiSerialize-s of a Logger and its ancestors


impl OwnedKeyValueList

New OwnedKeyValueList node with an existing parent

New OwnedKeyValue node without a parent (root)

Get the parent node element on the chain of values

Since OwnedKeyValueList is just a chain of SyncMultiSerialize instances: each containing one more more OwnedKeyValue, it's possible to iterate through the whole list group-by-group with parent() and values().

Get the head node SyncMultiSerialize values

Iterator over all OwnedKeyValue-s in every SyncMultiSerialize of the list

The order is reverse to how it was built. Eg.

extern crate slog;

fn main() {
    let drain = slog::Discard;
    let root = slog::Logger::root(drain, o!("k1" => "v1", "k2" => "k2"));
    let _log =!("k3" => "v3", "k4" => "v4"));

Will produce OwnedKeyValueList.iter() that returns k4, k3, k2, k1.


Get a unique stable identifier for this node

This function is buggy and will be removed at some point. Please see

Trait Implementations

impl Clone for OwnedKeyValueList

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more