facet-msgpack

Crates.iofacet-msgpack
lib.rsfacet-msgpack
version
sourcesrc
created_at2025-04-08 22:20:29.015146+00
updated_at2025-05-10 20:39:19.098704+00
descriptionMessagePack serialization and deserialization for Facet types
homepage
repositoryhttps://github.com/facet-rs/facet
max_upload_size
id1626035
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Amos Wenger (fasterthanlime)

documentation

README

Facet logo - a reflection library for Rust

Coverage Status free of syn crates.io documentation MIT/Apache-2.0 licensed

Logo by Misiasart

Thanks to all individual and corporate sponsors, without whom this work could not exist:

Ko-fi GitHub Sponsors Patreon Zed Depot

Provides MessagePack serialization and deserialization for facet types.

Usage

use facet::Facet;
use facet_msgpack::to_vec;

#[derive(Facet)]
struct MyStruct {
    field1: u32,
    field2: String,
}

let my_instance = MyStruct {
    field1: 42,
    field2: "hello".to_string(),
};

// Serialize to MessagePack bytes
let bytes = to_vec(&my_instance);

println!("Serialized MessagePack: {:?}", bytes);
// Output: Serialized MessagePack: [130, 166, 102, 105, 101, 108, 100, 49, 42, 166, 102, 105, 101, 108, 100, 50, 165, 104, 101, 108, 108, 111]

// Deserialization would use from_bytes (not shown here)

License

Licensed under either of:

at your option.

Commit count: 0

cargo fmt