Module parse

Source
Expand description

This module handles parsing a git-config file. Generally speaking, you want to use a higher abstraction such as File unless you have some explicit reason to work with events instead.

The workflow for interacting with this is to use from_bytes() to obtain all parse events or tokens of the given input.

On a higher level, one can use Events to parse all events into a set of easily interpretable data type, similar to what File does.

Modules§

section

Structs§

Comment
A parsed comment containing the comment marker and comment.
Error
A parser error reports the one-indexed line number where the parsing error occurred, as well as the last parser node and the remaining data to be parsed.
Events
A zero-copy git-config file parser.
Section
A parsed section containing the header and the section events, typically comprising the keys and their values.

Enums§

Event
Syntactic events that occurs in the config. Despite all these variants holding a Cow instead over a simple reference, the parser will only emit borrowed Cow variants.

Functions§

from_bytes
Attempt to zero-copy parse the provided bytes, passing results to dispatch.

Type Aliases§

FrontMatterEvents
A type store without allocation all events that are typically preceding the first section.