#![forbid(unsafe_code)]
mod ast;
mod de;
mod emit;
mod error;
mod key_identity;
#[cfg(feature = "lossless")]
pub mod lossless;
mod parse;
mod schema;
mod ser;
mod yaml11;
pub mod with;
pub mod stream {
pub use crate::parse::{DocumentStream, EventStream};
}
pub mod mapping {
pub use crate::ast::{
Entry, IntoIter, IntoKeys, IntoValues, Iter, IterMut, Keys, Mapping, MappingIndex as Index,
OccupiedEntry, VacantEntry, Values, ValuesMut,
};
}
pub mod value {
pub use crate::ast::{
Date, Index, Mapping, Number, Sequence, Tag, TaggedValue, Time, TimeZoneOffset, Timestamp,
Value,
};
pub use crate::de::from_value;
pub use crate::ser::{ValueSerializer as Serializer, to_value};
}
pub use ast::{
BorrowedNode, BorrowedNodeValue, BorrowedTaggedNode, Date, Entry, Index, Mapping, Node,
NodeValue, Number, OccupiedEntry, ScalarSource, Sequence, Tag, TaggedNode, TaggedValue, Time,
TimeZoneOffset, Timestamp, VacantEntry, Value,
};
pub use de::{
Deserializer, from_documents_reader, from_documents_slice, from_documents_str, from_node,
from_reader, from_slice, from_str, from_value,
};
pub use emit::{
BlockScalarStyle, EmitCollectionStyle, EmitFidelity, EmitOptions, KeyOrder, ScalarQuoteStyle,
};
pub use error::{
Diagnostic, Error, ErrorCategory, ErrorPath, ErrorPathSegment, Location, RelatedDiagnostic,
Result, SourceDiagnostic, SourceRenderOptions, Span,
};
#[cfg(feature = "lossless")]
pub use lossless::{
AliasId, AnchorId, LosslessAlias, LosslessAnchor, LosslessDocument, LosslessEdit,
LosslessEffectiveMappingEntry, LosslessEffectiveMappingSource, LosslessNode, LosslessNodeKind,
LosslessStream, LosslessTrivia, LosslessTriviaKind, NodeId, PathSegment, parse_lossless,
parse_lossless_bytes, parse_lossless_bytes_with_options, parse_lossless_with_options,
};
pub use parse::{
CollectionStyle, DocumentStream, Event, EventAnchor, EventDocumentDirectives, EventMeta,
EventStream, EventTag, EventTagDirective, EventYamlVersion, ScalarStyle,
parse_borrowed_documents, parse_bytes, parse_documents, parse_events, parse_str,
stream_documents, stream_documents_reader, stream_documents_slice, stream_events,
stream_events_reader, stream_events_slice,
};
pub use schema::{
DEFAULT_ALIAS_EXPANSION_FACTOR, DEFAULT_MAX_COLLECTION_ITEMS, DEFAULT_MAX_INPUT_BYTES,
DEFAULT_MAX_NESTING_DEPTH, DEFAULT_MAX_SCALAR_BYTES, DEFAULT_MIN_ALIAS_EXPANSION_NODES,
LoadOptions, Schema,
};
pub use ser::{
Serializer, to_string, to_string_with_options, to_value, to_writer, to_writer_with_options,
};