Skip to main content

Crate saphyr_parser_bw

Crate saphyr_parser_bw 

Source
Expand description

YAML 1.2 parser implementation in pure Rust.

If you want to load to a YAML Rust structure or manipulate YAML objects, use saphyr instead of saphyr-parser. This crate contains only the parser.

This is YAML 1.2 parser implementation and low-level parsing API for YAML. It allows users to fetch a stream of YAML events from a stream of characters.

§Usage

This crate is on github and can be used by adding saphyr-parser to the dependencies in your project’s Cargo.toml:

cargo add saphyr-parser

§Features

Note: With all features disabled, this crate’s MSRV is 1.65.0.

§debug_prints

Enables the debug module and usage of debug prints in the scanner and the parser. Do not enable if you are consuming the crate rather than working on it as this can significantly decrease performance.

The MSRV for this feature is 1.70.0.

This feature is not no_std compatible.

Re-exports§

pub use crate::input::BorrowedInput;
pub use crate::input::BufferedInput;
pub use crate::input::Input;

Modules§

input
Utilities to create a source of input to the parser.
parser_stack
A stack-based parser implementation.

Structs§

Marker
A location in a yaml document.
Parser
A YAML parser.
ScanError
An error that occurred while scanning.
Scanner
The YAML scanner.
Span
A range of locations in a Yaml document.
StrInput
A parser input that uses a &str as source.
Tag
A YAML tag.
Token
A scanner token.

Enums§

Event
An event generated by the YAML parser.
ScalarStyle
The style as which the scalar was written in the YAML document.
TokenType
The contents of a scanner token.

Traits§

EventReceiver
Trait to be implemented in order to use the low-level parsing API.
ParserTrait
Trait extracted from Parser to support mocking and alternative implementations.
SpannedEventReceiver
Trait to be implemented for using the low-level parsing API.