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
// Copyright 2020-2025 Velithris
// SPDX-License-Identifier: MIT
//! This library provides routines for deserializing and serializing [`LuaValues`](LuaValue)
//! in a way compatible with a Lua library called AceSerialize.
//!
//! # Deserialization example
//!
//! This is how you can use the library to deserialize strings produced by AceSerialize.
//!
//! ```
//! use weakauras_codec_ace_serialize::{DeserializationError, Deserializer};
//!
//! fn main() -> Result<(), DeserializationError> {
//! assert_eq!(
//! Deserializer::from_str("^1^SHello,~`world!^^")
//! .deserialize_first()?
//! .unwrap(),
//! "Hello, world!".into()
//! );
//! Ok(())
//! }
//! ```
//!
//! # Serialization example
//!
//! This is how you can use the library to serialize values in a way compatible with AceSerialize.
//!
//! ```
//! use weakauras_codec_ace_serialize::{SerializationError, Serializer};
//!
//! fn main() -> Result<(), SerializationError> {
//! assert_eq!(
//! Serializer::serialize_one(&"Hello, world!".into(), None)?,
//! "^1^SHello,~`world!^^"
//! );
//! Ok(())
//! }
//! ```
//!
//! # Crate features
//!
//! * **lua-value-arbitrary** - Implement `arbitrary::Arbitrary` for [`LuaValue`]. **Disabled** by default.
//! * **lua-value-fnv** - Use `fnv` instead of `BTreeMap` as the implementation of [`LuaValue::Map`]. **Disabled** by default.
//! * **lua-value-indexmap** - Use `indexmap` instead of `BTreeMap` as the implementation of [`LuaValue::Map`]. **Disabled** by default.
//! * **serde** - Allow serializing and deserializing [`LuaValue`] using `serde`. **Disabled** by default.
/// Deserialization.
/// Error types.
pub
/// Serialization.
pub use Deserializer;
pub use *;
pub use Serializer;
pub use LuaValue;