Module parser

Module parser 

Source

Structs§

ParsedRecord
RecordSplitter
迭代器,从输入日志文本中产生记录切片(&str),不进行额外分配。

Functions§

for_each_record
对记录进行流式处理,并对每条记录调用回调而不分配 Vec。 这是处理日志文本时分配最少的方式。
parse_all
顺序解析所有记录并返回 ParsedRecord 的 Vec。
parse_into
解析到调用方提供的 Vec 中以避免每次调用分配新的 Vec。
parse_record
解析单条记录(由 split_by_ts_records_with_errors 生成)。 返回一个从输入 rec 借用的 ParsedRecord。
parse_records_with
解析每条记录并用 ParsedRecord 调用回调;与流式 Splitter 一起使用时实现零分配。
split_by_ts_records_with_errors
使用时间戳检测将完整日志文本拆分为记录。 返回 (records, leading_errors)。每条记录都是从 text 借用的切片。
split_into
拆分到调用者提供的容器以避免每次调用分配。