Skip to main content

Crate rlsp_yaml_parser

Crate rlsp_yaml_parser 

Source
Expand description

A spec-faithful streaming YAML 1.2 parser.

Use parse_events for a lazy event stream, or the loader module to build a full AST.

Re-exports§

pub use loader::LoadError;
pub use loader::LoadMode;
pub use loader::Loader;
pub use loader::LoaderBuilder;
pub use loader::LoaderOptions;
pub use loader::load;
pub use node::Document;
pub use node::Node;
pub use schema::ResolvedTag;
pub use schema::Schema;
pub use limits::MAX_ANCHOR_NAME_BYTES;
pub use limits::MAX_COLLECTION_DEPTH;
pub use limits::MAX_COMMENT_LEN;
pub use limits::MAX_DIRECTIVES_PER_DOC;
pub use limits::MAX_RESOLVED_TAG_LEN;
pub use limits::MAX_SCALAR_LEN;
pub use limits::MAX_TAG_HANDLE_BYTES;
pub use limits::MAX_TAG_LEN;

Modules§

encoding
Encoding detection and UTF-8 decoding for YAML byte streams.
limits
Security limit constants for the parser and loader.
loader
Event-to-AST loader that builds a Vec<Document<Span>>. Event-to-AST loader.
node
YAML AST node types.
schema
YAML 1.2.2 §10 schema tag resolution. YAML 1.2.2 §10 schema tag resolution.

Structs§

Error
A parse error produced by the streaming parser.
EventMeta
Rare per-event fields for node-typed events (Scalar, SequenceStart, MappingStart).
Line
A single logical line extracted from the input.
LineBuffer
A one-line-lookahead buffer over a &'input str.
LineIndex
An index over a document’s byte offsets that resolves byte offsets to (line, column) pairs on demand.
Pos
A position within the input stream.
Span
A half-open span [start, end) within the input stream, stored as byte offsets.

Enums§

BreakType
The type of line terminator that ends a Line.
Chomp
Block scalar chomping mode per YAML 1.2 §8.1.1.2.
CollectionStyle
The style (block or flow) of a collection (sequence or mapping).
ErrorKind
The category of a parse error.
Event
A high-level YAML parse event.
ScalarStyle
The style in which a scalar value was written in the source.

Functions§

parse_events
Parse a YAML string into a lazy event stream.