Skip to main content

eure_document/
lib.rs

1#![no_std]
2extern crate alloc;
3
4#[cfg(feature = "std")]
5extern crate std;
6
7// Re-export commonly used types for eure! macro users
8pub use text::Text;
9
10/// A data structure for representing a Eure document without any span information.
11pub mod tree;
12
13/// Identifier type and parser.
14pub mod identifier;
15
16/// Unified text type for strings and code.
17pub mod text;
18
19/// A type-safe data-type of Eure data-model.
20pub mod value;
21
22/// A data structure for representing a Eure document including extensions.
23pub mod document;
24
25// Re-export constructor at the root for macro compatibility with `#[eure(crate = ::eure_document)]`
26pub use document::constructor;
27
28/// Data structure for representing a path in a Eure document.
29pub mod path;
30
31/// Data structure for representing a data-model of Eure.
32pub mod data_model;
33
34/// Trait for parsing Rust types from Eure documents.
35pub mod parse;
36
37/// Trait for writing Rust types to Eure documents.
38pub mod write;
39
40/// Source-level document representation with layout metadata.
41///
42/// Used for programmatic construction of Eure documents with preserved
43/// formatting information (comments, section ordering, etc.).
44pub mod source;
45
46/// Macro for building Eure documents.
47mod eure_macro;
48
49pub mod map;
50
51/// Zero-sized types for compile-time literal matching in `FromEure`.
52pub mod must_be;
53
54/// Proxy types for use with `#[eure(via = "...")]` attribute.
55pub mod proxy;
56
57pub(crate) mod prelude_internal {
58    #![allow(unused_imports)]
59    #![allow(deprecated)]
60    pub use crate::data_model::*;
61    pub use crate::document::constructor::DocumentConstructor;
62    pub use crate::document::node::{Node, NodeMap, NodeMut, NodeValue};
63    pub use crate::document::{EureDocument, InsertError, InsertErrorKind, NodeId};
64    pub use crate::eure;
65    pub use crate::identifier::Identifier;
66    pub use crate::map::Map;
67    pub use crate::path::{EurePath, PathSegment};
68    pub use crate::text::{Language, SyntaxHint, Text, TextParseError};
69    pub use crate::value::{ObjectKey, PrimitiveValue};
70    pub use alloc::boxed::Box;
71    pub use alloc::{string::String, string::ToString, vec, vec::Vec};
72    pub use thisisplural::Plural;
73}