qubit-codec-binary 0.1.0

Buffer-oriented binary codecs for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use qubit_codec_binary::{
    Leb128DecodePolicy,
    NonStrict,
    Strict,
};

fn is_strict<P: Leb128DecodePolicy>() -> bool {
    P::STRICT
}

#[test]
fn test_leb128_decode_policy_exposes_strict_flag() {
    assert!(is_strict::<Strict>());
    assert!(!is_strict::<NonStrict>());
}