struct MessageParser
A stateful parser that reconstructs fully attributed `LogsData` records from a stream of
FXT log packets.
# Background
&
Architecture
In the Fuchsia Trace Format (FXT) structured logging protocol, log attribution metadata is
separated from the actual log payload to optimize transmission overhead. Instead of repeating
the full moniker and component URL on every log record, the system transmits two distinct
types of records:
1. **Manifest/Control Records**: Sent with the `LOG_CONTROL_BIT` set. These records map a
numeric base tag ID to component identity metadata (`ExtendedMoniker` and URL).
2. **Legacy Log Records**: Contain the message content, severity, timestamp, and
arguments, along with a tag ID indicating which component produced the log.
# Stateful Parsing
`MessageParser` maintains an internal `tag_map` to track the active association between
numeric tag IDs and their component identity (`ExtendedMetadata`).
- When parsing a manifest record (`is_control == true`), `MessageParser` updates its state
mapping for the derived base tag. If the record also reports rolled out (dropped) logs, a
`LogsData` payload representing those dropped logs is returned. Otherwise, it registers
the attribution mapping and returns `Ok((None, remaining))`.
- When parsing a legacy log record (`is_control == false`), `MessageParser` resolves the
record's tag to retrieve the component's identity from the internal mapping, constructing
a fully attributed `LogsData` containing the correct component moniker and URL.