kf-protocol 3.0.0

Native Rust implementation of kafka protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use kf_protocol::derive::KfDefault;

#[derive(KfDefault, Debug)]
struct TestRecord {
    value: i8,
    value2: i8,
    #[fluvio_kf(default = "4")]
    value3: i8,
    #[fluvio_kf(default = "-1")]
    value4: i16,
}

#[test]
fn test_default() {
    let record = TestRecord::default();
    assert_eq!(record.value3, 4);
    assert_eq!(record.value4, -1);
}