microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
microfmt::log::ring_buffer_log_reader Class Reference

Pull-based reader for extracting structured logs via RAII transactions. Natively supports the reloco/rust functional iterator pipeline. More...

#include <ring_buffer_sink_protocol_sink.hpp>

Inheritance diagram for microfmt::log::ring_buffer_log_reader:
Inheritance graph
[legend]
Collaboration diagram for microfmt::log::ring_buffer_log_reader:
Collaboration graph
[legend]

Public Types

using item_type = log_record_tx
 

Public Member Functions

constexpr ring_buffer_log_reader (reloco::detail::unowned_ring_base< char > &ring RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS) noexcept
 
reloco::optional< log_record_tx > try_read () &noexcept
 Attempts to extract the next log frame.
 
reloco::optional< log_record_tx > next_impl () noexcept
 The magic hook that fuels the reloco::iterator_adaptor pipeline!
 

Detailed Description

Pull-based reader for extracting structured logs via RAII transactions. Natively supports the reloco/rust functional iterator pipeline.

Member Typedef Documentation

◆ item_type

Constructor & Destructor Documentation

◆ ring_buffer_log_reader()

constexpr microfmt::log::ring_buffer_log_reader::ring_buffer_log_reader ( reloco::detail::unowned_ring_base< char > &ring RELOCO_LIFETIMEBOUND  RELOCO_LIFETIME_CAPTURE_BY_THIS)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ next_impl()

reloco::optional< log_record_tx > microfmt::log::ring_buffer_log_reader::next_impl ( )
inlinenoexcept

The magic hook that fuels the reloco::iterator_adaptor pipeline!

◆ try_read()

reloco::optional< log_record_tx > microfmt::log::ring_buffer_log_reader::try_read ( ) &
inlinenoexcept

Attempts to extract the next log frame.

Returns
A valid log_record_tx if a frame exists, or an empty/false transaction if empty.

The documentation for this class was generated from the following file: