alogfmt
Implements an encoder for logfmt using serde.
To use, add the following the [dependencies] table in your Cargo.toml.
= "^0.1.0"
Usage
The primary interface of this package consists of the to_string, to_bytes, and to_writer functions.
These functions can be used to serialize logfmt-encoded structures to a String, Vec<u8>, and an io::Write
respectively.
use ;
use Result;
use Serialize;
The Serializer implementation is also exported. It wraps an io::Write and can be used in a similar manner to to_writer.
The Serializer is not particularly expensive to construct, so calling to_writer should be fine normally. If you'd like to
re-use the Serializer, you must call serializer.reset() or serializer.next() to reset the serializer's internal state such
that it is ready for the next document.
use Serializer;
use Result;
use Serialize;
License
Copyright (C) 2023 Aurora McGinnis
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.