1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! `mf2-model` — the Unicode MessageFormat 2 (MF2) interchange data model as
//! Rust types, plus the identities and error kinds every mf2-two crate shares
//! and the [`Frontend`] trait a parser implements.
//!
//! The data model's structs mirror the specification's `message.json` field
//! for field, and code builds them by literal; a later MF2 that defines a
//! new structure adds a variant, which is why the enums are
//! `#[non_exhaustive]`.
//!
//! * [`MsgId`], [`Dir`] — identities shared with the catalog and the runtime.
//! * [`is_name_start`], [`is_name_char`] — the ABNF's name classes, shared by
//! the two frontends.
//! * [`ErrorKind`], [`ErrorClass`], [`Span`], [`Diagnostic`], [`Diagnostics`] —
//! the 13 error kinds of the WG test suite plus two, and how a frontend
//! reports them.
//! * [`Message`] and everything below it — the specification's interchange
//! data model, one-to-one.
//! * [`Parsed`], [`Frontend`] — the parser boundary.
//!
//! Values are kept **as written**: nothing in this crate normalizes. Names
//! exclude the bidi marks the syntax allows around them (spec, "Names and
//! Identifiers"); equality is exact (bytewise), which is what the round-trip
//! properties of the conformance tests need. Normalization belongs to
//! comparison (validation in `mf2-syntax`) and to catalog encoding.
//!
//! `#![no_std]` + `alloc`, no dependencies by default. Features: `serde` (JSON
//! that validates against the specification's `message.json`) and `suite-names` (error kinds ↔ the
//! suite's strings). The client wasm links only [`MsgId`], [`Dir`] and
//! [`ErrorKind`].
//!
//! # The user guide
//!
//! Getting started, call sites, delivery modes, switching language,
//! accessibility, migrating from `leptos-fluent`, and what 1.x promises
//! (`versioning.md`): the user guide is the `docs/` directory of the
//! mf2-two repository. An application formatting messages starts at
//! [`mf2`](https://docs.rs/mf2); this crate is for tools that work on the
//! data model itself, with `mf2-syntax`.
// docs.rs (`cargo xtask docs-rs`): each feature-gated item says which features it needs.
extern crate alloc;
pub use Cow;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;