protobuf/
fixed.rs
1pub(crate) trait ProtobufFixed {
3 const LEN: u32;
5}
6
7impl ProtobufFixed for u32 {
8 const LEN: u32 = 4;
9}
10
11impl ProtobufFixed for i32 {
12 const LEN: u32 = 4;
13}
14
15impl ProtobufFixed for u64 {
16 const LEN: u32 = 8;
17}
18
19impl ProtobufFixed for i64 {
20 const LEN: u32 = 8;
21}
22
23impl ProtobufFixed for f32 {
24 const LEN: u32 = 4;
25}
26
27impl ProtobufFixed for f64 {
28 const LEN: u32 = 8;
29}
30
31impl ProtobufFixed for bool {
34 const LEN: u32 = 1;
35}