Crates.io | weakauras-codec-ace-serialize |
lib.rs | weakauras-codec-ace-serialize |
version | 0.1.0 |
created_at | 2025-06-08 10:44:13.707492+00 |
updated_at | 2025-06-08 10:44:13.707492+00 |
description | Provides routines for deserializing and serializing LuaValues in a way compatible with a Lua library called AceSerialize. |
homepage | |
repository | https://github.com/Zireael-N/weakauras-codec-rs |
max_upload_size | |
id | 1704767 |
size | 30,382 |
This library provides routines for deserializing and serializing LuaValues
in a way compatible with a Lua library called AceSerialize.
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(())
}
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(())
}
arbitrary::Arbitrary
for LuaValue
. Disabled by default.fnv
instead of BTreeMap
as the implementation of LuaValue::Map
. Disabled by default.indexmap
instead of BTreeMap
as the implementation of LuaValue::Map
. Disabled by default.LuaValue
using serde
. Disabled by default.