3Hren / 3Hren/msgpack-rust

What's the rust type for msgpack bin8 type?

Open
#280 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.4k
Forks
162
PR merge metrics
No merged PRs in 30d

Description

```rust
fn test_msgpack() {
#[derive(Deserialize, Serialize, Debug)]
struct A {
a: Vec,
}

// 0x91: array of 1, 0xc4: bin8, 0x01: length, 0x48='H'
let bs = vec![0x91, 0xc4, 0x01, 0x48];

let mut de = Deserializer::new(&bs[..]);

let a: A = Deserialize::deserialize(&mut de).unwrap();
}
```

this test will fail with error: thread 'conn::conn::tests::test_msgpack' panicked at 'called `Result::unwrap()` on an `Err` value: Syntax("invalid type: byte array, expected a sequence")', src/conn/conn.rs:81:54.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.