Expand description
§Journald Journal Export Format Parser.
This library contains a small parser for the Journald Journal Export Format.
The format is very versatile. Each stream consists of a series of journal entries, each of which comprising one or more fields. A field is simply a key value pair, similar to Unix process environment variables.
The parser avoids heap allocations and operates on a buffer with bounded size. The lengths of the fields and overall entry size can be controlled using with the config::JournalExportLimits struct.
The parsing logic is separated out from any i/o-logic. self::journald::parser::JournalExportParser contains the parser logic and manages the buffer. The structs JournalExportAsyncRead and JournalExportRead provide async and sync versions of a parser.
§Implementation notes
Both, JournalExportRead and JournalExportAsyncRead are stateful objects
that buffer the last parsed journal entry. The latter can be accessed using
the get_entry()
-method which returns a journald::parser::RefEntry object.
Re-exports§
pub use journald::parser::JournalExportParser;
pub use journald::parser::RefEntry;
pub use journald::JournalExportAsyncRead;
pub use journald::JournalExportRead;
pub use journald::JournalExportReadError;
Modules§
- config
- fieldname
- Parse (known) field names of journald-entries.
- journald
- shiftbuffer
- Operate on the tail of a data stream that is managed using a buffer of limited size.