asdf-yaml 0.2.1

ASDF-flavoured YAML document model, parser and emitter
Documentation
//! ASDF-flavoured YAML: document model, parser and emitter.
//!
//! ASDF stores its tree as a YAML 1.1 document with three requirements that
//! general-purpose Rust YAML crates do not currently meet together:
//!
//! - **Tags are the type system.** `!core/ndarray-1.1.0` is what makes a
//!   mapping an array, so tags must survive parsing and be re-emitted.
//! - **Anchors and aliases are load-bearing.** Files in the standard's own
//!   reference corpus share nodes through aliases, and a round trip must not
//!   silently duplicate or drop them.
//! - **Scalar style carries meaning.** A quoted `"123"` is a string where an
//!   unquoted `123` is an integer.
//!
//! This crate builds on `saphyr-parser`'s event stream, which surfaces tags,
//! anchor ids and styles, and adds the document model and emitter on top.

#![forbid(unsafe_code)]

// Named so `alloc::` paths can be written directly. The crate links `std`,
// but spelling collection and string types at the narrowest layer that
// defines them keeps a future `no_std` build a small step away.
extern crate alloc;

pub mod compare;
pub mod document;
pub mod emit;
pub mod node;
pub mod parse;
pub mod path;
pub mod scalar;
pub mod tag;

pub use compare::{CompareOptions, Comparison, Difference, compare, compare_from};
pub use document::{Document, YamlVersion};
pub use emit::{EmitError, EmitOptions, emit, emit_with};
pub use node::{CollectionStyle, Entry, Node, NodeData, NodeId, ScalarStyle, Span};
pub use parse::{ParseError, YamlEvent, YamlEventKind, parse_document, scan_events};
pub use path::{Component, Path, PathError};
pub use scalar::{Resolved, Schema, ValueType, resolve, resolve_tagged};
pub use tag::{ASDF_CORE_TAG_PREFIX, ASDF_STANDARD_TAG_PREFIX, Tag, TagHandle};