Module git_config::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
Structs
A parsed comment containing the comment marker and comment.
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.
A zero-copy git-config
file parser.
An unvalidated parse result of parsing input like remote.origin.url
or core.bare
.
A parsed section containing the header and the section events, typically comprising the keys and their values.
Enums
Functions
Attempt to zero-copy parse the provided bytes, passing results to dispatch
.
Parse input
like core.bare
or remote.origin.url
as a Key
to make its fields available,
or None
if there were not at least 2 tokens separated by .
.
Note that input
isn’t validated, and is str
as ascii is a subset of UTF-8 which is required for any valid keys.
Type Definitions
A type store without allocation all events that are typicaly preceeding the first section.