pulsar-binary-protocol-spec 0.0.1

Pulsar binary protocol specification
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::protos::protobuf::pulsar_api::CommandAck_AckType as Protobuf_AckType;

#[derive(PartialEq, Eq, Debug, Clone)]
pub enum AckType {
    Individual,
    Cumulative,
}

impl From<AckType> for Protobuf_AckType {
    fn from(at: AckType) -> Self {
        match at {
            AckType::Individual => Protobuf_AckType::Individual,
            AckType::Cumulative => Protobuf_AckType::Cumulative,
        }
    }
}