Coverage Report

Created: 2026-06-07 07:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/prost/src/encoding.rs
Line
Count
Source
1
//! Utility functions and types for encoding and decoding Protobuf types.
2
//!
3
//! Meant to be used only from `Message` implementations.
4
5
#![allow(clippy::implicit_hasher, clippy::ptr_arg)]
6
7
use alloc::collections::BTreeMap;
8
use alloc::format;
9
use alloc::string::String;
10
use alloc::vec::Vec;
11
use core::cmp::min;
12
use core::convert::TryFrom;
13
use core::mem;
14
use core::str;
15
use core::u32;
16
use core::usize;
17
18
use ::bytes::{Buf, BufMut, Bytes};
19
20
use crate::DecodeError;
21
use crate::Message;
22
23
/// Encodes an integer value into LEB128 variable length format, and writes it to the buffer.
24
/// The buffer must have enough remaining space (maximum 10 bytes).
25
#[inline]
26
2.14G
pub fn encode_varint<B>(mut value: u64, buf: &mut B)
27
2.14G
where
28
2.14G
    B: BufMut,
29
{
30
    // Safety notes:
31
    //
32
    // - ptr::write is an unsafe raw pointer write. The use here is safe since the length of the
33
    //   uninit slice is checked.
34
    // - advance_mut is unsafe because it could cause uninitialized memory to be advanced over. The
35
    //   use here is safe since each byte which is advanced over has been written to in the
36
    //   previous loop iteration.
37
    unsafe {
38
        let mut i;
39
        'outer: loop {
40
2.14G
            i = 0;
41
42
2.14G
            let uninit_slice = buf.chunk_mut();
43
3.33G
            for offset in 0..uninit_slice.len() {
44
3.33G
                i += 1;
45
3.33G
                let ptr = uninit_slice.as_mut_ptr().add(offset);
46
3.33G
                if value < 0x80 {
47
2.14G
                    ptr.write(value as u8);
48
2.14G
                    break 'outer;
49
1.19G
                } else {
50
1.19G
                    ptr.write(((value & 0x7F) | 0x80) as u8);
51
1.19G
                    value >>= 7;
52
1.19G
                }
53
            }
54
55
46.5k
            buf.advance_mut(i);
56
46.5k
            debug_assert!(buf.has_remaining_mut());
57
        }
58
59
2.14G
        buf.advance_mut(i);
60
    }
61
2.14G
}
prost::encoding::encode_varint::<alloc::vec::Vec<u8>>
Line
Count
Source
26
1.04G
pub fn encode_varint<B>(mut value: u64, buf: &mut B)
27
1.04G
where
28
1.04G
    B: BufMut,
29
{
30
    // Safety notes:
31
    //
32
    // - ptr::write is an unsafe raw pointer write. The use here is safe since the length of the
33
    //   uninit slice is checked.
34
    // - advance_mut is unsafe because it could cause uninitialized memory to be advanced over. The
35
    //   use here is safe since each byte which is advanced over has been written to in the
36
    //   previous loop iteration.
37
    unsafe {
38
        let mut i;
39
        'outer: loop {
40
1.04G
            i = 0;
41
42
1.04G
            let uninit_slice = buf.chunk_mut();
43
1.63G
            for offset in 0..uninit_slice.len() {
44
1.63G
                i += 1;
45
1.63G
                let ptr = uninit_slice.as_mut_ptr().add(offset);
46
1.63G
                if value < 0x80 {
47
1.04G
                    ptr.write(value as u8);
48
1.04G
                    break 'outer;
49
582M
                } else {
50
582M
                    ptr.write(((value & 0x7F) | 0x80) as u8);
51
582M
                    value >>= 7;
52
582M
                }
53
            }
54
55
21.4k
            buf.advance_mut(i);
56
21.4k
            debug_assert!(buf.has_remaining_mut());
57
        }
58
59
1.04G
        buf.advance_mut(i);
60
    }
61
1.04G
}
Unexecuted instantiation: prost::encoding::encode_varint::<_>
prost::encoding::encode_varint::<alloc::vec::Vec<u8>>
Line
Count
Source
26
1.09G
pub fn encode_varint<B>(mut value: u64, buf: &mut B)
27
1.09G
where
28
1.09G
    B: BufMut,
29
{
30
    // Safety notes:
31
    //
32
    // - ptr::write is an unsafe raw pointer write. The use here is safe since the length of the
33
    //   uninit slice is checked.
34
    // - advance_mut is unsafe because it could cause uninitialized memory to be advanced over. The
35
    //   use here is safe since each byte which is advanced over has been written to in the
36
    //   previous loop iteration.
37
    unsafe {
38
        let mut i;
39
        'outer: loop {
40
1.09G
            i = 0;
41
42
1.09G
            let uninit_slice = buf.chunk_mut();
43
1.70G
            for offset in 0..uninit_slice.len() {
44
1.70G
                i += 1;
45
1.70G
                let ptr = uninit_slice.as_mut_ptr().add(offset);
46
1.70G
                if value < 0x80 {
47
1.09G
                    ptr.write(value as u8);
48
1.09G
                    break 'outer;
49
607M
                } else {
50
607M
                    ptr.write(((value & 0x7F) | 0x80) as u8);
51
607M
                    value >>= 7;
52
607M
                }
53
            }
54
55
25.0k
            buf.advance_mut(i);
56
25.0k
            debug_assert!(buf.has_remaining_mut());
57
        }
58
59
1.09G
        buf.advance_mut(i);
60
    }
61
1.09G
}
62
63
/// Decodes a LEB128-encoded variable length integer from the buffer.
64
1.64G
pub fn decode_varint<B>(buf: &mut B) -> Result<u64, DecodeError>
65
1.64G
where
66
1.64G
    B: Buf,
67
{
68
1.64G
    let bytes = buf.chunk();
69
1.64G
    let len = bytes.len();
70
1.64G
    if len == 0 {
71
2.80k
        return Err(DecodeError::new("invalid varint"));
72
1.64G
    }
73
74
1.64G
    let byte = unsafe { *bytes.get_unchecked(0) };
75
1.64G
    if byte < 0x80 {
76
998M
        buf.advance(1);
77
998M
        Ok(u64::from(byte))
78
645M
    } else if len > 10 || bytes[len - 1] < 0x80 {
79
645M
        let (value, advance) = unsafe { decode_varint_slice(bytes) }?;
80
645M
        buf.advance(advance);
81
645M
        Ok(value)
82
    } else {
83
3.10k
        decode_varint_slow(buf)
84
    }
85
1.64G
}
prost::encoding::decode_varint::<&mut &[u8]>
Line
Count
Source
64
807M
pub fn decode_varint<B>(buf: &mut B) -> Result<u64, DecodeError>
65
807M
where
66
807M
    B: Buf,
67
{
68
807M
    let bytes = buf.chunk();
69
807M
    let len = bytes.len();
70
807M
    if len == 0 {
71
1.50k
        return Err(DecodeError::new("invalid varint"));
72
807M
    }
73
74
807M
    let byte = unsafe { *bytes.get_unchecked(0) };
75
807M
    if byte < 0x80 {
76
491M
        buf.advance(1);
77
491M
        Ok(u64::from(byte))
78
315M
    } else if len > 10 || bytes[len - 1] < 0x80 {
79
315M
        let (value, advance) = unsafe { decode_varint_slice(bytes) }?;
80
315M
        buf.advance(advance);
81
315M
        Ok(value)
82
    } else {
83
1.40k
        decode_varint_slow(buf)
84
    }
85
807M
}
Unexecuted instantiation: prost::encoding::decode_varint::<_>
prost::encoding::decode_varint::<&mut &[u8]>
Line
Count
Source
64
836M
pub fn decode_varint<B>(buf: &mut B) -> Result<u64, DecodeError>
65
836M
where
66
836M
    B: Buf,
67
{
68
836M
    let bytes = buf.chunk();
69
836M
    let len = bytes.len();
70
836M
    if len == 0 {
71
1.30k
        return Err(DecodeError::new("invalid varint"));
72
836M
    }
73
74
836M
    let byte = unsafe { *bytes.get_unchecked(0) };
75
836M
    if byte < 0x80 {
76
506M
        buf.advance(1);
77
506M
        Ok(u64::from(byte))
78
330M
    } else if len > 10 || bytes[len - 1] < 0x80 {
79
330M
        let (value, advance) = unsafe { decode_varint_slice(bytes) }?;
80
330M
        buf.advance(advance);
81
330M
        Ok(value)
82
    } else {
83
1.69k
        decode_varint_slow(buf)
84
    }
85
836M
}
86
87
/// Decodes a LEB128-encoded variable length integer from the slice, returning the value and the
88
/// number of bytes read.
89
///
90
/// Based loosely on [`ReadVarint64FromArray`][1].
91
///
92
/// ## Safety
93
///
94
/// The caller must ensure that `bytes` is non-empty and either `bytes.len() >= 10` or the last
95
/// element in bytes is < `0x80`.
96
///
97
/// [1]: https://github.com/google/protobuf/blob/3.3.x/src/google/protobuf/io/coded_stream.cc#L365-L406
98
#[inline]
99
645M
unsafe fn decode_varint_slice(bytes: &[u8]) -> Result<(u64, usize), DecodeError> {
100
    // Fully unrolled varint decoding loop. Splitting into 32-bit pieces gives better performance.
101
102
    let mut b: u8;
103
    let mut part0: u32;
104
645M
    b = *bytes.get_unchecked(0);
105
645M
    part0 = u32::from(b);
106
645M
    if b < 0x80 {
107
0
        return Ok((u64::from(part0), 1));
108
645M
    };
109
645M
    part0 -= 0x80;
110
645M
    b = *bytes.get_unchecked(1);
111
645M
    part0 += u32::from(b) << 7;
112
645M
    if b < 0x80 {
113
631M
        return Ok((u64::from(part0), 2));
114
13.9M
    };
115
13.9M
    part0 -= 0x80 << 7;
116
13.9M
    b = *bytes.get_unchecked(2);
117
13.9M
    part0 += u32::from(b) << 14;
118
13.9M
    if b < 0x80 {
119
8.79M
        return Ok((u64::from(part0), 3));
120
5.18M
    };
121
5.18M
    part0 -= 0x80 << 14;
122
5.18M
    b = *bytes.get_unchecked(3);
123
5.18M
    part0 += u32::from(b) << 21;
124
5.18M
    if b < 0x80 {
125
2.44M
        return Ok((u64::from(part0), 4));
126
2.74M
    };
127
2.74M
    part0 -= 0x80 << 21;
128
2.74M
    let value = u64::from(part0);
129
130
    let mut part1: u32;
131
2.74M
    b = *bytes.get_unchecked(4);
132
2.74M
    part1 = u32::from(b);
133
2.74M
    if b < 0x80 {
134
1.67M
        return Ok((value + (u64::from(part1) << 28), 5));
135
1.06M
    };
136
1.06M
    part1 -= 0x80;
137
1.06M
    b = *bytes.get_unchecked(5);
138
1.06M
    part1 += u32::from(b) << 7;
139
1.06M
    if b < 0x80 {
140
274k
        return Ok((value + (u64::from(part1) << 28), 6));
141
789k
    };
142
789k
    part1 -= 0x80 << 7;
143
789k
    b = *bytes.get_unchecked(6);
144
789k
    part1 += u32::from(b) << 14;
145
789k
    if b < 0x80 {
146
313k
        return Ok((value + (u64::from(part1) << 28), 7));
147
475k
    };
148
475k
    part1 -= 0x80 << 14;
149
475k
    b = *bytes.get_unchecked(7);
150
475k
    part1 += u32::from(b) << 21;
151
475k
    if b < 0x80 {
152
138k
        return Ok((value + (u64::from(part1) << 28), 8));
153
336k
    };
154
336k
    part1 -= 0x80 << 21;
155
336k
    let value = value + ((u64::from(part1)) << 28);
156
157
    let mut part2: u32;
158
336k
    b = *bytes.get_unchecked(8);
159
336k
    part2 = u32::from(b);
160
336k
    if b < 0x80 {
161
195k
        return Ok((value + (u64::from(part2) << 56), 9));
162
141k
    };
163
141k
    part2 -= 0x80;
164
141k
    b = *bytes.get_unchecked(9);
165
141k
    part2 += u32::from(b) << 7;
166
141k
    if b < 0x80 {
167
141k
        return Ok((value + (u64::from(part2) << 56), 10));
168
36
    };
169
170
    // We have overrun the maximum size of a varint (10 bytes). Assume the data is corrupt.
171
36
    Err(DecodeError::new("invalid varint"))
172
645M
}
prost::encoding::decode_varint_slice
Line
Count
Source
99
315M
unsafe fn decode_varint_slice(bytes: &[u8]) -> Result<(u64, usize), DecodeError> {
100
    // Fully unrolled varint decoding loop. Splitting into 32-bit pieces gives better performance.
101
102
    let mut b: u8;
103
    let mut part0: u32;
104
315M
    b = *bytes.get_unchecked(0);
105
315M
    part0 = u32::from(b);
106
315M
    if b < 0x80 {
107
0
        return Ok((u64::from(part0), 1));
108
315M
    };
109
315M
    part0 -= 0x80;
110
315M
    b = *bytes.get_unchecked(1);
111
315M
    part0 += u32::from(b) << 7;
112
315M
    if b < 0x80 {
113
308M
        return Ok((u64::from(part0), 2));
114
7.35M
    };
115
7.35M
    part0 -= 0x80 << 7;
116
7.35M
    b = *bytes.get_unchecked(2);
117
7.35M
    part0 += u32::from(b) << 14;
118
7.35M
    if b < 0x80 {
119
4.68M
        return Ok((u64::from(part0), 3));
120
2.67M
    };
121
2.67M
    part0 -= 0x80 << 14;
122
2.67M
    b = *bytes.get_unchecked(3);
123
2.67M
    part0 += u32::from(b) << 21;
124
2.67M
    if b < 0x80 {
125
985k
        return Ok((u64::from(part0), 4));
126
1.69M
    };
127
1.69M
    part0 -= 0x80 << 21;
128
1.69M
    let value = u64::from(part0);
129
130
    let mut part1: u32;
131
1.69M
    b = *bytes.get_unchecked(4);
132
1.69M
    part1 = u32::from(b);
133
1.69M
    if b < 0x80 {
134
1.09M
        return Ok((value + (u64::from(part1) << 28), 5));
135
599k
    };
136
599k
    part1 -= 0x80;
137
599k
    b = *bytes.get_unchecked(5);
138
599k
    part1 += u32::from(b) << 7;
139
599k
    if b < 0x80 {
140
138k
        return Ok((value + (u64::from(part1) << 28), 6));
141
461k
    };
142
461k
    part1 -= 0x80 << 7;
143
461k
    b = *bytes.get_unchecked(6);
144
461k
    part1 += u32::from(b) << 14;
145
461k
    if b < 0x80 {
146
263k
        return Ok((value + (u64::from(part1) << 28), 7));
147
197k
    };
148
197k
    part1 -= 0x80 << 14;
149
197k
    b = *bytes.get_unchecked(7);
150
197k
    part1 += u32::from(b) << 21;
151
197k
    if b < 0x80 {
152
57.4k
        return Ok((value + (u64::from(part1) << 28), 8));
153
140k
    };
154
140k
    part1 -= 0x80 << 21;
155
140k
    let value = value + ((u64::from(part1)) << 28);
156
157
    let mut part2: u32;
158
140k
    b = *bytes.get_unchecked(8);
159
140k
    part2 = u32::from(b);
160
140k
    if b < 0x80 {
161
88.6k
        return Ok((value + (u64::from(part2) << 56), 9));
162
51.7k
    };
163
51.7k
    part2 -= 0x80;
164
51.7k
    b = *bytes.get_unchecked(9);
165
51.7k
    part2 += u32::from(b) << 7;
166
51.7k
    if b < 0x80 {
167
51.6k
        return Ok((value + (u64::from(part2) << 56), 10));
168
20
    };
169
170
    // We have overrun the maximum size of a varint (10 bytes). Assume the data is corrupt.
171
20
    Err(DecodeError::new("invalid varint"))
172
315M
}
Unexecuted instantiation: prost::encoding::decode_varint_slice
prost::encoding::decode_varint_slice
Line
Count
Source
99
330M
unsafe fn decode_varint_slice(bytes: &[u8]) -> Result<(u64, usize), DecodeError> {
100
    // Fully unrolled varint decoding loop. Splitting into 32-bit pieces gives better performance.
101
102
    let mut b: u8;
103
    let mut part0: u32;
104
330M
    b = *bytes.get_unchecked(0);
105
330M
    part0 = u32::from(b);
106
330M
    if b < 0x80 {
107
0
        return Ok((u64::from(part0), 1));
108
330M
    };
109
330M
    part0 -= 0x80;
110
330M
    b = *bytes.get_unchecked(1);
111
330M
    part0 += u32::from(b) << 7;
112
330M
    if b < 0x80 {
113
323M
        return Ok((u64::from(part0), 2));
114
6.61M
    };
115
6.61M
    part0 -= 0x80 << 7;
116
6.61M
    b = *bytes.get_unchecked(2);
117
6.61M
    part0 += u32::from(b) << 14;
118
6.61M
    if b < 0x80 {
119
4.11M
        return Ok((u64::from(part0), 3));
120
2.50M
    };
121
2.50M
    part0 -= 0x80 << 14;
122
2.50M
    b = *bytes.get_unchecked(3);
123
2.50M
    part0 += u32::from(b) << 21;
124
2.50M
    if b < 0x80 {
125
1.45M
        return Ok((u64::from(part0), 4));
126
1.04M
    };
127
1.04M
    part0 -= 0x80 << 21;
128
1.04M
    let value = u64::from(part0);
129
130
    let mut part1: u32;
131
1.04M
    b = *bytes.get_unchecked(4);
132
1.04M
    part1 = u32::from(b);
133
1.04M
    if b < 0x80 {
134
586k
        return Ok((value + (u64::from(part1) << 28), 5));
135
463k
    };
136
463k
    part1 -= 0x80;
137
463k
    b = *bytes.get_unchecked(5);
138
463k
    part1 += u32::from(b) << 7;
139
463k
    if b < 0x80 {
140
135k
        return Ok((value + (u64::from(part1) << 28), 6));
141
327k
    };
142
327k
    part1 -= 0x80 << 7;
143
327k
    b = *bytes.get_unchecked(6);
144
327k
    part1 += u32::from(b) << 14;
145
327k
    if b < 0x80 {
146
49.8k
        return Ok((value + (u64::from(part1) << 28), 7));
147
277k
    };
148
277k
    part1 -= 0x80 << 14;
149
277k
    b = *bytes.get_unchecked(7);
150
277k
    part1 += u32::from(b) << 21;
151
277k
    if b < 0x80 {
152
81.2k
        return Ok((value + (u64::from(part1) << 28), 8));
153
196k
    };
154
196k
    part1 -= 0x80 << 21;
155
196k
    let value = value + ((u64::from(part1)) << 28);
156
157
    let mut part2: u32;
158
196k
    b = *bytes.get_unchecked(8);
159
196k
    part2 = u32::from(b);
160
196k
    if b < 0x80 {
161
106k
        return Ok((value + (u64::from(part2) << 56), 9));
162
90.0k
    };
163
90.0k
    part2 -= 0x80;
164
90.0k
    b = *bytes.get_unchecked(9);
165
90.0k
    part2 += u32::from(b) << 7;
166
90.0k
    if b < 0x80 {
167
90.0k
        return Ok((value + (u64::from(part2) << 56), 10));
168
16
    };
169
170
    // We have overrun the maximum size of a varint (10 bytes). Assume the data is corrupt.
171
16
    Err(DecodeError::new("invalid varint"))
172
330M
}
173
174
/// Decodes a LEB128-encoded variable length integer from the buffer, advancing the buffer as
175
/// necessary.
176
#[inline(never)]
177
3.10k
fn decode_varint_slow<B>(buf: &mut B) -> Result<u64, DecodeError>
178
3.10k
where
179
3.10k
    B: Buf,
180
{
181
3.10k
    let mut value = 0;
182
6.15k
    for count in 0..min(10, buf.remaining()) {
183
6.15k
        let byte = buf.get_u8();
184
6.15k
        value |= u64::from(byte & 0x7F) << (count * 7);
185
6.15k
        if byte <= 0x7F {
186
2.64k
            return Ok(value);
187
3.51k
        }
188
    }
189
190
461
    Err(DecodeError::new("invalid varint"))
191
3.10k
}
prost::encoding::decode_varint_slow::<&mut &[u8]>
Line
Count
Source
177
1.40k
fn decode_varint_slow<B>(buf: &mut B) -> Result<u64, DecodeError>
178
1.40k
where
179
1.40k
    B: Buf,
180
{
181
1.40k
    let mut value = 0;
182
2.84k
    for count in 0..min(10, buf.remaining()) {
183
2.84k
        let byte = buf.get_u8();
184
2.84k
        value |= u64::from(byte & 0x7F) << (count * 7);
185
2.84k
        if byte <= 0x7F {
186
1.12k
            return Ok(value);
187
1.71k
        }
188
    }
189
190
279
    Err(DecodeError::new("invalid varint"))
191
1.40k
}
Unexecuted instantiation: prost::encoding::decode_varint_slow::<_>
prost::encoding::decode_varint_slow::<&mut &[u8]>
Line
Count
Source
177
1.69k
fn decode_varint_slow<B>(buf: &mut B) -> Result<u64, DecodeError>
178
1.69k
where
179
1.69k
    B: Buf,
180
{
181
1.69k
    let mut value = 0;
182
3.31k
    for count in 0..min(10, buf.remaining()) {
183
3.31k
        let byte = buf.get_u8();
184
3.31k
        value |= u64::from(byte & 0x7F) << (count * 7);
185
3.31k
        if byte <= 0x7F {
186
1.51k
            return Ok(value);
187
1.79k
        }
188
    }
189
190
182
    Err(DecodeError::new("invalid varint"))
191
1.69k
}
192
193
/// Additional information passed to every decode/merge function.
194
///
195
/// The context should be passed by value and can be freely cloned. When passing
196
/// to a function which is decoding a nested object, then use `enter_recursion`.
197
#[derive(Clone, Debug)]
198
pub struct DecodeContext {
199
    /// How many times we can recurse in the current decode stack before we hit
200
    /// the recursion limit.
201
    ///
202
    /// The recursion limit is defined by `RECURSION_LIMIT` and cannot be
203
    /// customized. The recursion limit can be ignored by building the Prost
204
    /// crate with the `no-recursion-limit` feature.
205
    #[cfg(not(feature = "no-recursion-limit"))]
206
    recurse_count: u32,
207
}
208
209
impl Default for DecodeContext {
210
    #[cfg(not(feature = "no-recursion-limit"))]
211
    #[inline]
212
82.8k
    fn default() -> DecodeContext {
213
82.8k
        DecodeContext {
214
82.8k
            recurse_count: crate::RECURSION_LIMIT,
215
82.8k
        }
216
82.8k
    }
<prost::encoding::DecodeContext as core::default::Default>::default
Line
Count
Source
212
45.7k
    fn default() -> DecodeContext {
213
45.7k
        DecodeContext {
214
45.7k
            recurse_count: crate::RECURSION_LIMIT,
215
45.7k
        }
216
45.7k
    }
Unexecuted instantiation: <prost::encoding::DecodeContext as core::default::Default>::default
<prost::encoding::DecodeContext as core::default::Default>::default
Line
Count
Source
212
37.0k
    fn default() -> DecodeContext {
213
37.0k
        DecodeContext {
214
37.0k
            recurse_count: crate::RECURSION_LIMIT,
215
37.0k
        }
216
37.0k
    }
217
218
    #[cfg(feature = "no-recursion-limit")]
219
    #[inline]
220
    fn default() -> DecodeContext {
221
        DecodeContext {}
222
    }
223
}
224
225
impl DecodeContext {
226
    /// Call this function before recursively decoding.
227
    ///
228
    /// There is no `exit` function since this function creates a new `DecodeContext`
229
    /// to be used at the next level of recursion. Continue to use the old context
230
    // at the previous level of recursion.
231
    #[cfg(not(feature = "no-recursion-limit"))]
232
    #[inline]
233
7.42M
    pub(crate) fn enter_recursion(&self) -> DecodeContext {
234
7.42M
        DecodeContext {
235
7.42M
            recurse_count: self.recurse_count - 1,
236
7.42M
        }
237
7.42M
    }
<prost::encoding::DecodeContext>::enter_recursion
Line
Count
Source
233
4.53M
    pub(crate) fn enter_recursion(&self) -> DecodeContext {
234
4.53M
        DecodeContext {
235
4.53M
            recurse_count: self.recurse_count - 1,
236
4.53M
        }
237
4.53M
    }
Unexecuted instantiation: <prost::encoding::DecodeContext>::enter_recursion
<prost::encoding::DecodeContext>::enter_recursion
Line
Count
Source
233
2.89M
    pub(crate) fn enter_recursion(&self) -> DecodeContext {
234
2.89M
        DecodeContext {
235
2.89M
            recurse_count: self.recurse_count - 1,
236
2.89M
        }
237
2.89M
    }
238
239
    #[cfg(feature = "no-recursion-limit")]
240
    #[inline]
241
    pub(crate) fn enter_recursion(&self) -> DecodeContext {
242
        DecodeContext {}
243
    }
244
245
    /// Checks whether the recursion limit has been reached in the stack of
246
    /// decodes described by the `DecodeContext` at `self.ctx`.
247
    ///
248
    /// Returns `Ok<()>` if it is ok to continue recursing.
249
    /// Returns `Err<DecodeError>` if the recursion limit has been reached.
250
    #[cfg(not(feature = "no-recursion-limit"))]
251
    #[inline]
252
8.75M
    pub(crate) fn limit_reached(&self) -> Result<(), DecodeError> {
253
8.75M
        if self.recurse_count == 0 {
254
74
            Err(DecodeError::new("recursion limit reached"))
255
        } else {
256
8.75M
            Ok(())
257
        }
258
8.75M
    }
<prost::encoding::DecodeContext>::limit_reached
Line
Count
Source
252
5.41M
    pub(crate) fn limit_reached(&self) -> Result<(), DecodeError> {
253
5.41M
        if self.recurse_count == 0 {
254
46
            Err(DecodeError::new("recursion limit reached"))
255
        } else {
256
5.41M
            Ok(())
257
        }
258
5.41M
    }
Unexecuted instantiation: <prost::encoding::DecodeContext>::limit_reached
<prost::encoding::DecodeContext>::limit_reached
Line
Count
Source
252
3.33M
    pub(crate) fn limit_reached(&self) -> Result<(), DecodeError> {
253
3.33M
        if self.recurse_count == 0 {
254
28
            Err(DecodeError::new("recursion limit reached"))
255
        } else {
256
3.33M
            Ok(())
257
        }
258
3.33M
    }
259
260
    #[cfg(feature = "no-recursion-limit")]
261
    #[inline]
262
    #[allow(clippy::unnecessary_wraps)] // needed in other features
263
    pub(crate) fn limit_reached(&self) -> Result<(), DecodeError> {
264
        Ok(())
265
    }
266
}
267
268
/// Returns the encoded length of the value in LEB128 variable length format.
269
/// The returned value will be between 1 and 10, inclusive.
270
#[inline]
271
1.75G
pub fn encoded_len_varint(value: u64) -> usize {
272
    // Based on [VarintSize64][1].
273
    // [1]: https://github.com/google/protobuf/blob/3.3.x/src/google/protobuf/io/coded_stream.h#L1301-L1309
274
1.75G
    ((((value | 1).leading_zeros() ^ 63) * 9 + 73) / 64) as usize
275
1.75G
}
prost::encoding::encoded_len_varint
Line
Count
Source
271
881M
pub fn encoded_len_varint(value: u64) -> usize {
272
    // Based on [VarintSize64][1].
273
    // [1]: https://github.com/google/protobuf/blob/3.3.x/src/google/protobuf/io/coded_stream.h#L1301-L1309
274
881M
    ((((value | 1).leading_zeros() ^ 63) * 9 + 73) / 64) as usize
275
881M
}
prost::encoding::encoded_len_varint
Line
Count
Source
271
393k
pub fn encoded_len_varint(value: u64) -> usize {
272
    // Based on [VarintSize64][1].
273
    // [1]: https://github.com/google/protobuf/blob/3.3.x/src/google/protobuf/io/coded_stream.h#L1301-L1309
274
393k
    ((((value | 1).leading_zeros() ^ 63) * 9 + 73) / 64) as usize
275
393k
}
prost::encoding::encoded_len_varint
Line
Count
Source
271
872M
pub fn encoded_len_varint(value: u64) -> usize {
272
    // Based on [VarintSize64][1].
273
    // [1]: https://github.com/google/protobuf/blob/3.3.x/src/google/protobuf/io/coded_stream.h#L1301-L1309
274
872M
    ((((value | 1).leading_zeros() ^ 63) * 9 + 73) / 64) as usize
275
872M
}
276
277
#[derive(Clone, Copy, Debug, PartialEq)]
278
#[repr(u8)]
279
pub enum WireType {
280
    Varint = 0,
281
    SixtyFourBit = 1,
282
    LengthDelimited = 2,
283
    StartGroup = 3,
284
    EndGroup = 4,
285
    ThirtyTwoBit = 5,
286
}
287
288
pub const MIN_TAG: u32 = 1;
289
pub const MAX_TAG: u32 = (1 << 29) - 1;
290
291
impl TryFrom<u64> for WireType {
292
    type Error = DecodeError;
293
294
    #[inline]
295
552M
    fn try_from(value: u64) -> Result<Self, Self::Error> {
296
552M
        match value {
297
539M
            0 => Ok(WireType::Varint),
298
1.33M
            1 => Ok(WireType::SixtyFourBit),
299
7.73M
            2 => Ok(WireType::LengthDelimited),
300
777k
            3 => Ok(WireType::StartGroup),
301
808k
            4 => Ok(WireType::EndGroup),
302
2.85M
            5 => Ok(WireType::ThirtyTwoBit),
303
366
            _ => Err(DecodeError::new(format!(
304
366
                "invalid wire type value: {}",
305
366
                value
306
366
            ))),
307
        }
308
552M
    }
<prost::encoding::WireType as core::convert::TryFrom<u64>>::try_from
Line
Count
Source
295
272M
    fn try_from(value: u64) -> Result<Self, Self::Error> {
296
272M
        match value {
297
264M
            0 => Ok(WireType::Varint),
298
615k
            1 => Ok(WireType::SixtyFourBit),
299
4.96M
            2 => Ok(WireType::LengthDelimited),
300
360k
            3 => Ok(WireType::StartGroup),
301
336k
            4 => Ok(WireType::EndGroup),
302
1.73M
            5 => Ok(WireType::ThirtyTwoBit),
303
205
            _ => Err(DecodeError::new(format!(
304
205
                "invalid wire type value: {}",
305
205
                value
306
205
            ))),
307
        }
308
272M
    }
Unexecuted instantiation: <prost::encoding::WireType as core::convert::TryFrom<u64>>::try_from
<prost::encoding::WireType as core::convert::TryFrom<u64>>::try_from
Line
Count
Source
295
280M
    fn try_from(value: u64) -> Result<Self, Self::Error> {
296
280M
        match value {
297
274M
            0 => Ok(WireType::Varint),
298
717k
            1 => Ok(WireType::SixtyFourBit),
299
2.76M
            2 => Ok(WireType::LengthDelimited),
300
417k
            3 => Ok(WireType::StartGroup),
301
471k
            4 => Ok(WireType::EndGroup),
302
1.12M
            5 => Ok(WireType::ThirtyTwoBit),
303
161
            _ => Err(DecodeError::new(format!(
304
161
                "invalid wire type value: {}",
305
161
                value
306
161
            ))),
307
        }
308
280M
    }
309
}
310
311
/// Encodes a Protobuf field key, which consists of a wire type designator and
312
/// the field tag.
313
#[inline]
314
1.06G
pub fn encode_key<B>(tag: u32, wire_type: WireType, buf: &mut B)
315
1.06G
where
316
1.06G
    B: BufMut,
317
{
318
1.06G
    debug_assert!((MIN_TAG..=MAX_TAG).contains(&tag));
319
1.06G
    let key = (tag << 3) | wire_type as u32;
320
1.06G
    encode_varint(u64::from(key), buf);
321
1.06G
}
prost::encoding::encode_key::<alloc::vec::Vec<u8>>
Line
Count
Source
314
523M
pub fn encode_key<B>(tag: u32, wire_type: WireType, buf: &mut B)
315
523M
where
316
523M
    B: BufMut,
317
{
318
523M
    debug_assert!((MIN_TAG..=MAX_TAG).contains(&tag));
319
523M
    let key = (tag << 3) | wire_type as u32;
320
523M
    encode_varint(u64::from(key), buf);
321
523M
}
Unexecuted instantiation: prost::encoding::encode_key::<_>
prost::encoding::encode_key::<alloc::vec::Vec<u8>>
Line
Count
Source
314
546M
pub fn encode_key<B>(tag: u32, wire_type: WireType, buf: &mut B)
315
546M
where
316
546M
    B: BufMut,
317
{
318
546M
    debug_assert!((MIN_TAG..=MAX_TAG).contains(&tag));
319
546M
    let key = (tag << 3) | wire_type as u32;
320
546M
    encode_varint(u64::from(key), buf);
321
546M
}
322
323
/// Decodes a Protobuf field key, which consists of a wire type designator and
324
/// the field tag.
325
#[inline(always)]
326
552M
pub fn decode_key<B>(buf: &mut B) -> Result<(u32, WireType), DecodeError>
327
552M
where
328
552M
    B: Buf,
329
{
330
552M
    let key = decode_varint(buf)?;
331
552M
    if key > u64::from(u32::MAX) {
332
160
        return Err(DecodeError::new(format!("invalid key value: {}", key)));
333
552M
    }
334
552M
    let wire_type = WireType::try_from(key & 0x07)?;
335
552M
    let tag = key as u32 >> 3;
336
337
552M
    if tag < MIN_TAG {
338
1.03k
        return Err(DecodeError::new("invalid tag value: 0"));
339
552M
    }
340
341
552M
    Ok((tag, wire_type))
342
552M
}
prost::encoding::decode_key::<&mut &[u8]>
Line
Count
Source
326
272M
pub fn decode_key<B>(buf: &mut B) -> Result<(u32, WireType), DecodeError>
327
272M
where
328
272M
    B: Buf,
329
{
330
272M
    let key = decode_varint(buf)?;
331
272M
    if key > u64::from(u32::MAX) {
332
94
        return Err(DecodeError::new(format!("invalid key value: {}", key)));
333
272M
    }
334
272M
    let wire_type = WireType::try_from(key & 0x07)?;
335
272M
    let tag = key as u32 >> 3;
336
337
272M
    if tag < MIN_TAG {
338
570
        return Err(DecodeError::new("invalid tag value: 0"));
339
272M
    }
340
341
272M
    Ok((tag, wire_type))
342
272M
}
Unexecuted instantiation: prost::encoding::decode_key::<_>
prost::encoding::decode_key::<&mut &[u8]>
Line
Count
Source
326
280M
pub fn decode_key<B>(buf: &mut B) -> Result<(u32, WireType), DecodeError>
327
280M
where
328
280M
    B: Buf,
329
{
330
280M
    let key = decode_varint(buf)?;
331
280M
    if key > u64::from(u32::MAX) {
332
66
        return Err(DecodeError::new(format!("invalid key value: {}", key)));
333
280M
    }
334
280M
    let wire_type = WireType::try_from(key & 0x07)?;
335
280M
    let tag = key as u32 >> 3;
336
337
280M
    if tag < MIN_TAG {
338
464
        return Err(DecodeError::new("invalid tag value: 0"));
339
280M
    }
340
341
280M
    Ok((tag, wire_type))
342
280M
}
343
344
/// Returns the width of an encoded Protobuf field key with the given tag.
345
/// The returned width will be between 1 and 5 bytes (inclusive).
346
#[inline]
347
129M
pub fn key_len(tag: u32) -> usize {
348
129M
    encoded_len_varint(u64::from(tag << 3))
349
129M
}
prost::encoding::key_len
Line
Count
Source
347
83.9M
pub fn key_len(tag: u32) -> usize {
348
83.9M
    encoded_len_varint(u64::from(tag << 3))
349
83.9M
}
prost::encoding::key_len
Line
Count
Source
347
197k
pub fn key_len(tag: u32) -> usize {
348
197k
    encoded_len_varint(u64::from(tag << 3))
349
197k
}
prost::encoding::key_len
Line
Count
Source
347
45.6M
pub fn key_len(tag: u32) -> usize {
348
45.6M
    encoded_len_varint(u64::from(tag << 3))
349
45.6M
}
350
351
/// Checks that the expected wire type matches the actual wire type,
352
/// or returns an error result.
353
#[inline]
354
1.62G
pub fn check_wire_type(expected: WireType, actual: WireType) -> Result<(), DecodeError> {
355
1.62G
    if expected != actual {
356
1.33k
        return Err(DecodeError::new(format!(
357
1.33k
            "invalid wire type: {:?} (expected {:?})",
358
1.33k
            actual, expected
359
1.33k
        )));
360
1.62G
    }
361
1.62G
    Ok(())
362
1.62G
}
prost::encoding::check_wire_type
Line
Count
Source
354
796M
pub fn check_wire_type(expected: WireType, actual: WireType) -> Result<(), DecodeError> {
355
796M
    if expected != actual {
356
744
        return Err(DecodeError::new(format!(
357
744
            "invalid wire type: {:?} (expected {:?})",
358
744
            actual, expected
359
744
        )));
360
796M
    }
361
796M
    Ok(())
362
796M
}
Unexecuted instantiation: prost::encoding::check_wire_type
prost::encoding::check_wire_type
Line
Count
Source
354
828M
pub fn check_wire_type(expected: WireType, actual: WireType) -> Result<(), DecodeError> {
355
828M
    if expected != actual {
356
587
        return Err(DecodeError::new(format!(
357
587
            "invalid wire type: {:?} (expected {:?})",
358
587
            actual, expected
359
587
        )));
360
828M
    }
361
828M
    Ok(())
362
828M
}
363
364
/// Helper function which abstracts reading a length delimiter prefix followed
365
/// by decoding values until the length of bytes is exhausted.
366
7.82M
pub fn merge_loop<T, M, B>(
367
7.82M
    value: &mut T,
368
7.82M
    buf: &mut B,
369
7.82M
    ctx: DecodeContext,
370
7.82M
    mut merge: M,
371
7.82M
) -> Result<(), DecodeError>
372
7.82M
where
373
7.82M
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
7.82M
    B: Buf,
375
{
376
7.82M
    let len = decode_varint(buf)?;
377
7.82M
    let remaining = buf.remaining();
378
7.82M
    if len > remaining as u64 {
379
9.56k
        return Err(DecodeError::new("buffer underflow"));
380
7.81M
    }
381
382
7.81M
    let limit = remaining - len as usize;
383
566M
    while buf.remaining() > limit {
384
558M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
7.76M
    if buf.remaining() != limit {
388
834
        return Err(DecodeError::new("delimited length exceeded"));
389
7.76M
    }
390
7.76M
    Ok(())
391
7.82M
}
prost::encoding::merge_loop::<alloc::vec::Vec<bool>, prost::encoding::bool::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
7.21k
pub fn merge_loop<T, M, B>(
367
7.21k
    value: &mut T,
368
7.21k
    buf: &mut B,
369
7.21k
    ctx: DecodeContext,
370
7.21k
    mut merge: M,
371
7.21k
) -> Result<(), DecodeError>
372
7.21k
where
373
7.21k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
7.21k
    B: Buf,
375
{
376
7.21k
    let len = decode_varint(buf)?;
377
7.21k
    let remaining = buf.remaining();
378
7.21k
    if len > remaining as u64 {
379
102
        return Err(DecodeError::new("buffer underflow"));
380
7.10k
    }
381
382
7.10k
    let limit = remaining - len as usize;
383
91.9k
    while buf.remaining() > limit {
384
84.8k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
7.10k
    if buf.remaining() != limit {
388
1
        return Err(DecodeError::new("delimited length exceeded"));
389
7.10k
    }
390
7.10k
    Ok(())
391
7.21k
}
prost::encoding::merge_loop::<alloc::vec::Vec<f64>, prost::encoding::double::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
12.0k
pub fn merge_loop<T, M, B>(
367
12.0k
    value: &mut T,
368
12.0k
    buf: &mut B,
369
12.0k
    ctx: DecodeContext,
370
12.0k
    mut merge: M,
371
12.0k
) -> Result<(), DecodeError>
372
12.0k
where
373
12.0k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
12.0k
    B: Buf,
375
{
376
12.0k
    let len = decode_varint(buf)?;
377
12.0k
    let remaining = buf.remaining();
378
12.0k
    if len > remaining as u64 {
379
109
        return Err(DecodeError::new("buffer underflow"));
380
11.9k
    }
381
382
11.9k
    let limit = remaining - len as usize;
383
174k
    while buf.remaining() > limit {
384
162k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
11.9k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
11.9k
    }
390
11.9k
    Ok(())
391
12.0k
}
prost::encoding::merge_loop::<alloc::vec::Vec<f32>, prost::encoding::float::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
19.6k
pub fn merge_loop<T, M, B>(
367
19.6k
    value: &mut T,
368
19.6k
    buf: &mut B,
369
19.6k
    ctx: DecodeContext,
370
19.6k
    mut merge: M,
371
19.6k
) -> Result<(), DecodeError>
372
19.6k
where
373
19.6k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
19.6k
    B: Buf,
375
{
376
19.6k
    let len = decode_varint(buf)?;
377
19.6k
    let remaining = buf.remaining();
378
19.6k
    if len > remaining as u64 {
379
117
        return Err(DecodeError::new("buffer underflow"));
380
19.5k
    }
381
382
19.5k
    let limit = remaining - len as usize;
383
907k
    while buf.remaining() > limit {
384
888k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
19.5k
    if buf.remaining() != limit {
388
2
        return Err(DecodeError::new("delimited length exceeded"));
389
19.5k
    }
390
19.5k
    Ok(())
391
19.6k
}
prost::encoding::merge_loop::<alloc::vec::Vec<u8>, prost::encoding::message::merge<alloc::vec::Vec<u8>, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
51.1k
pub fn merge_loop<T, M, B>(
367
51.1k
    value: &mut T,
368
51.1k
    buf: &mut B,
369
51.1k
    ctx: DecodeContext,
370
51.1k
    mut merge: M,
371
51.1k
) -> Result<(), DecodeError>
372
51.1k
where
373
51.1k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
51.1k
    B: Buf,
375
{
376
51.1k
    let len = decode_varint(buf)?;
377
51.1k
    let remaining = buf.remaining();
378
51.1k
    if len > remaining as u64 {
379
100
        return Err(DecodeError::new("buffer underflow"));
380
51.0k
    }
381
382
51.0k
    let limit = remaining - len as usize;
383
56.1k
    while buf.remaining() > limit {
384
5.20k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
50.9k
    if buf.remaining() != limit {
388
4
        return Err(DecodeError::new("delimited length exceeded"));
389
50.9k
    }
390
50.9k
    Ok(())
391
51.1k
}
prost::encoding::merge_loop::<alloc::vec::Vec<i32>, prost::encoding::int32::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
49.3k
pub fn merge_loop<T, M, B>(
367
49.3k
    value: &mut T,
368
49.3k
    buf: &mut B,
369
49.3k
    ctx: DecodeContext,
370
49.3k
    mut merge: M,
371
49.3k
) -> Result<(), DecodeError>
372
49.3k
where
373
49.3k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
49.3k
    B: Buf,
375
{
376
49.3k
    let len = decode_varint(buf)?;
377
49.3k
    let remaining = buf.remaining();
378
49.3k
    if len > remaining as u64 {
379
116
        return Err(DecodeError::new("buffer underflow"));
380
49.2k
    }
381
382
49.2k
    let limit = remaining - len as usize;
383
3.71M
    while buf.remaining() > limit {
384
3.67M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
49.2k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
49.2k
    }
390
49.2k
    Ok(())
391
49.3k
}
prost::encoding::merge_loop::<alloc::vec::Vec<i32>, prost::encoding::sint32::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
21.8k
pub fn merge_loop<T, M, B>(
367
21.8k
    value: &mut T,
368
21.8k
    buf: &mut B,
369
21.8k
    ctx: DecodeContext,
370
21.8k
    mut merge: M,
371
21.8k
) -> Result<(), DecodeError>
372
21.8k
where
373
21.8k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
21.8k
    B: Buf,
375
{
376
21.8k
    let len = decode_varint(buf)?;
377
21.8k
    let remaining = buf.remaining();
378
21.8k
    if len > remaining as u64 {
379
98
        return Err(DecodeError::new("buffer underflow"));
380
21.7k
    }
381
382
21.7k
    let limit = remaining - len as usize;
383
23.5M
    while buf.remaining() > limit {
384
23.5M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
21.7k
    if buf.remaining() != limit {
388
2
        return Err(DecodeError::new("delimited length exceeded"));
389
21.7k
    }
390
21.7k
    Ok(())
391
21.8k
}
prost::encoding::merge_loop::<alloc::vec::Vec<i32>, prost::encoding::sfixed32::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
4.23k
pub fn merge_loop<T, M, B>(
367
4.23k
    value: &mut T,
368
4.23k
    buf: &mut B,
369
4.23k
    ctx: DecodeContext,
370
4.23k
    mut merge: M,
371
4.23k
) -> Result<(), DecodeError>
372
4.23k
where
373
4.23k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
4.23k
    B: Buf,
375
{
376
4.23k
    let len = decode_varint(buf)?;
377
4.22k
    let remaining = buf.remaining();
378
4.22k
    if len > remaining as u64 {
379
103
        return Err(DecodeError::new("buffer underflow"));
380
4.12k
    }
381
382
4.12k
    let limit = remaining - len as usize;
383
41.6k
    while buf.remaining() > limit {
384
37.5k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
4.11k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
4.11k
    }
390
4.11k
    Ok(())
391
4.23k
}
prost::encoding::merge_loop::<alloc::vec::Vec<u32>, prost::encoding::uint32::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
33.9k
pub fn merge_loop<T, M, B>(
367
33.9k
    value: &mut T,
368
33.9k
    buf: &mut B,
369
33.9k
    ctx: DecodeContext,
370
33.9k
    mut merge: M,
371
33.9k
) -> Result<(), DecodeError>
372
33.9k
where
373
33.9k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
33.9k
    B: Buf,
375
{
376
33.9k
    let len = decode_varint(buf)?;
377
33.9k
    let remaining = buf.remaining();
378
33.9k
    if len > remaining as u64 {
379
72
        return Err(DecodeError::new("buffer underflow"));
380
33.8k
    }
381
382
33.8k
    let limit = remaining - len as usize;
383
182M
    while buf.remaining() > limit {
384
182M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
33.8k
    if buf.remaining() != limit {
388
1
        return Err(DecodeError::new("delimited length exceeded"));
389
33.8k
    }
390
33.8k
    Ok(())
391
33.9k
}
prost::encoding::merge_loop::<alloc::vec::Vec<u32>, prost::encoding::fixed32::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
2.59k
pub fn merge_loop<T, M, B>(
367
2.59k
    value: &mut T,
368
2.59k
    buf: &mut B,
369
2.59k
    ctx: DecodeContext,
370
2.59k
    mut merge: M,
371
2.59k
) -> Result<(), DecodeError>
372
2.59k
where
373
2.59k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
2.59k
    B: Buf,
375
{
376
2.59k
    let len = decode_varint(buf)?;
377
2.59k
    let remaining = buf.remaining();
378
2.59k
    if len > remaining as u64 {
379
98
        return Err(DecodeError::new("buffer underflow"));
380
2.49k
    }
381
382
2.49k
    let limit = remaining - len as usize;
383
446k
    while buf.remaining() > limit {
384
443k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
2.48k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
2.48k
    }
390
2.48k
    Ok(())
391
2.59k
}
prost::encoding::merge_loop::<alloc::vec::Vec<i64>, prost::encoding::int64::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
19.0k
pub fn merge_loop<T, M, B>(
367
19.0k
    value: &mut T,
368
19.0k
    buf: &mut B,
369
19.0k
    ctx: DecodeContext,
370
19.0k
    mut merge: M,
371
19.0k
) -> Result<(), DecodeError>
372
19.0k
where
373
19.0k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
19.0k
    B: Buf,
375
{
376
19.0k
    let len = decode_varint(buf)?;
377
19.0k
    let remaining = buf.remaining();
378
19.0k
    if len > remaining as u64 {
379
117
        return Err(DecodeError::new("buffer underflow"));
380
18.9k
    }
381
382
18.9k
    let limit = remaining - len as usize;
383
3.68M
    while buf.remaining() > limit {
384
3.66M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
18.9k
    if buf.remaining() != limit {
388
1
        return Err(DecodeError::new("delimited length exceeded"));
389
18.9k
    }
390
18.9k
    Ok(())
391
19.0k
}
prost::encoding::merge_loop::<alloc::vec::Vec<i64>, prost::encoding::sint64::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
16.5k
pub fn merge_loop<T, M, B>(
367
16.5k
    value: &mut T,
368
16.5k
    buf: &mut B,
369
16.5k
    ctx: DecodeContext,
370
16.5k
    mut merge: M,
371
16.5k
) -> Result<(), DecodeError>
372
16.5k
where
373
16.5k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
16.5k
    B: Buf,
375
{
376
16.5k
    let len = decode_varint(buf)?;
377
16.5k
    let remaining = buf.remaining();
378
16.5k
    if len > remaining as u64 {
379
62
        return Err(DecodeError::new("buffer underflow"));
380
16.4k
    }
381
382
16.4k
    let limit = remaining - len as usize;
383
48.7M
    while buf.remaining() > limit {
384
48.7M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
16.4k
    if buf.remaining() != limit {
388
1
        return Err(DecodeError::new("delimited length exceeded"));
389
16.4k
    }
390
16.4k
    Ok(())
391
16.5k
}
prost::encoding::merge_loop::<alloc::vec::Vec<i64>, prost::encoding::sfixed64::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
19.5k
pub fn merge_loop<T, M, B>(
367
19.5k
    value: &mut T,
368
19.5k
    buf: &mut B,
369
19.5k
    ctx: DecodeContext,
370
19.5k
    mut merge: M,
371
19.5k
) -> Result<(), DecodeError>
372
19.5k
where
373
19.5k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
19.5k
    B: Buf,
375
{
376
19.5k
    let len = decode_varint(buf)?;
377
19.5k
    let remaining = buf.remaining();
378
19.5k
    if len > remaining as u64 {
379
120
        return Err(DecodeError::new("buffer underflow"));
380
19.3k
    }
381
382
19.3k
    let limit = remaining - len as usize;
383
131k
    while buf.remaining() > limit {
384
111k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
19.3k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
19.3k
    }
390
19.3k
    Ok(())
391
19.5k
}
prost::encoding::merge_loop::<alloc::vec::Vec<u64>, prost::encoding::uint64::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
27.0k
pub fn merge_loop<T, M, B>(
367
27.0k
    value: &mut T,
368
27.0k
    buf: &mut B,
369
27.0k
    ctx: DecodeContext,
370
27.0k
    mut merge: M,
371
27.0k
) -> Result<(), DecodeError>
372
27.0k
where
373
27.0k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
27.0k
    B: Buf,
375
{
376
27.0k
    let len = decode_varint(buf)?;
377
27.0k
    let remaining = buf.remaining();
378
27.0k
    if len > remaining as u64 {
379
103
        return Err(DecodeError::new("buffer underflow"));
380
26.9k
    }
381
382
26.9k
    let limit = remaining - len as usize;
383
1.89M
    while buf.remaining() > limit {
384
1.86M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
26.9k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
26.9k
    }
390
26.9k
    Ok(())
391
27.0k
}
prost::encoding::merge_loop::<alloc::vec::Vec<u64>, prost::encoding::fixed64::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
9.03k
pub fn merge_loop<T, M, B>(
367
9.03k
    value: &mut T,
368
9.03k
    buf: &mut B,
369
9.03k
    ctx: DecodeContext,
370
9.03k
    mut merge: M,
371
9.03k
) -> Result<(), DecodeError>
372
9.03k
where
373
9.03k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
9.03k
    B: Buf,
375
{
376
9.03k
    let len = decode_varint(buf)?;
377
9.03k
    let remaining = buf.remaining();
378
9.03k
    if len > remaining as u64 {
379
104
        return Err(DecodeError::new("buffer underflow"));
380
8.92k
    }
381
382
8.92k
    let limit = remaining - len as usize;
383
44.3k
    while buf.remaining() > limit {
384
35.4k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
8.92k
    if buf.remaining() != limit {
388
6
        return Err(DecodeError::new("delimited length exceeded"));
389
8.91k
    }
390
8.91k
    Ok(())
391
9.03k
}
prost::encoding::merge_loop::<alloc::boxed::Box<protobuf::test_messages::proto3::TestAllTypesProto3>, prost::encoding::message::merge<alloc::boxed::Box<protobuf::test_messages::proto3::TestAllTypesProto3>, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
408k
pub fn merge_loop<T, M, B>(
367
408k
    value: &mut T,
368
408k
    buf: &mut B,
369
408k
    ctx: DecodeContext,
370
408k
    mut merge: M,
371
408k
) -> Result<(), DecodeError>
372
408k
where
373
408k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
408k
    B: Buf,
375
{
376
408k
    let len = decode_varint(buf)?;
377
408k
    let remaining = buf.remaining();
378
408k
    if len > remaining as u64 {
379
638
        return Err(DecodeError::new("buffer underflow"));
380
407k
    }
381
382
407k
    let limit = remaining - len as usize;
383
5.07M
    while buf.remaining() > limit {
384
4.68M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
388k
    if buf.remaining() != limit {
388
68
        return Err(DecodeError::new("delimited length exceeded"));
389
388k
    }
390
388k
    Ok(())
391
408k
}
prost::encoding::merge_loop::<alloc::boxed::Box<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>, prost::encoding::message::merge<alloc::boxed::Box<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
55.5k
pub fn merge_loop<T, M, B>(
367
55.5k
    value: &mut T,
368
55.5k
    buf: &mut B,
369
55.5k
    ctx: DecodeContext,
370
55.5k
    mut merge: M,
371
55.5k
) -> Result<(), DecodeError>
372
55.5k
where
373
55.5k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
55.5k
    B: Buf,
375
{
376
55.5k
    let len = decode_varint(buf)?;
377
55.5k
    let remaining = buf.remaining();
378
55.5k
    if len > remaining as u64 {
379
94
        return Err(DecodeError::new("buffer underflow"));
380
55.4k
    }
381
382
55.4k
    let limit = remaining - len as usize;
383
104k
    while buf.remaining() > limit {
384
49.3k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
54.8k
    if buf.remaining() != limit {
388
2
        return Err(DecodeError::new("delimited length exceeded"));
389
54.8k
    }
390
54.8k
    Ok(())
391
55.5k
}
prost::encoding::merge_loop::<prost_types::Any, prost::encoding::message::merge<prost_types::Any, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
56.9k
pub fn merge_loop<T, M, B>(
367
56.9k
    value: &mut T,
368
56.9k
    buf: &mut B,
369
56.9k
    ctx: DecodeContext,
370
56.9k
    mut merge: M,
371
56.9k
) -> Result<(), DecodeError>
372
56.9k
where
373
56.9k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
56.9k
    B: Buf,
375
{
376
56.9k
    let len = decode_varint(buf)?;
377
56.9k
    let remaining = buf.remaining();
378
56.9k
    if len > remaining as u64 {
379
105
        return Err(DecodeError::new("buffer underflow"));
380
56.8k
    }
381
382
56.8k
    let limit = remaining - len as usize;
383
77.4k
    while buf.remaining() > limit {
384
20.6k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
56.7k
    if buf.remaining() != limit {
388
8
        return Err(DecodeError::new("delimited length exceeded"));
389
56.7k
    }
390
56.7k
    Ok(())
391
56.9k
}
prost::encoding::merge_loop::<prost_types::Value, prost::encoding::message::merge<prost_types::Value, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
220k
pub fn merge_loop<T, M, B>(
367
220k
    value: &mut T,
368
220k
    buf: &mut B,
369
220k
    ctx: DecodeContext,
370
220k
    mut merge: M,
371
220k
) -> Result<(), DecodeError>
372
220k
where
373
220k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
220k
    B: Buf,
375
{
376
220k
    let len = decode_varint(buf)?;
377
220k
    let remaining = buf.remaining();
378
220k
    if len > remaining as u64 {
379
73
        return Err(DecodeError::new("buffer underflow"));
380
220k
    }
381
382
220k
    let limit = remaining - len as usize;
383
421k
    while buf.remaining() > limit {
384
202k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
218k
    if buf.remaining() != limit {
388
65
        return Err(DecodeError::new("delimited length exceeded"));
389
218k
    }
390
218k
    Ok(())
391
220k
}
prost::encoding::merge_loop::<prost_types::Struct, prost::encoding::message::merge<prost_types::Struct, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
237k
pub fn merge_loop<T, M, B>(
367
237k
    value: &mut T,
368
237k
    buf: &mut B,
369
237k
    ctx: DecodeContext,
370
237k
    mut merge: M,
371
237k
) -> Result<(), DecodeError>
372
237k
where
373
237k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
237k
    B: Buf,
375
{
376
237k
    let len = decode_varint(buf)?;
377
236k
    let remaining = buf.remaining();
378
236k
    if len > remaining as u64 {
379
104
        return Err(DecodeError::new("buffer underflow"));
380
236k
    }
381
382
236k
    let limit = remaining - len as usize;
383
455k
    while buf.remaining() > limit {
384
219k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
235k
    if buf.remaining() != limit {
388
43
        return Err(DecodeError::new("delimited length exceeded"));
389
235k
    }
390
235k
    Ok(())
391
237k
}
prost::encoding::merge_loop::<prost_types::Duration, prost::encoding::message::merge<prost_types::Duration, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
71.5k
pub fn merge_loop<T, M, B>(
367
71.5k
    value: &mut T,
368
71.5k
    buf: &mut B,
369
71.5k
    ctx: DecodeContext,
370
71.5k
    mut merge: M,
371
71.5k
) -> Result<(), DecodeError>
372
71.5k
where
373
71.5k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
71.5k
    B: Buf,
375
{
376
71.5k
    let len = decode_varint(buf)?;
377
71.5k
    let remaining = buf.remaining();
378
71.5k
    if len > remaining as u64 {
379
33
        return Err(DecodeError::new("buffer underflow"));
380
71.4k
    }
381
382
71.4k
    let limit = remaining - len as usize;
383
231k
    while buf.remaining() > limit {
384
159k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
71.4k
    if buf.remaining() != limit {
388
4
        return Err(DecodeError::new("delimited length exceeded"));
389
71.4k
    }
390
71.4k
    Ok(())
391
71.5k
}
prost::encoding::merge_loop::<prost_types::FieldMask, prost::encoding::message::merge<prost_types::FieldMask, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
34.9k
pub fn merge_loop<T, M, B>(
367
34.9k
    value: &mut T,
368
34.9k
    buf: &mut B,
369
34.9k
    ctx: DecodeContext,
370
34.9k
    mut merge: M,
371
34.9k
) -> Result<(), DecodeError>
372
34.9k
where
373
34.9k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
34.9k
    B: Buf,
375
{
376
34.9k
    let len = decode_varint(buf)?;
377
34.9k
    let remaining = buf.remaining();
378
34.9k
    if len > remaining as u64 {
379
94
        return Err(DecodeError::new("buffer underflow"));
380
34.8k
    }
381
382
34.8k
    let limit = remaining - len as usize;
383
58.0k
    while buf.remaining() > limit {
384
23.2k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
34.7k
    if buf.remaining() != limit {
388
21
        return Err(DecodeError::new("delimited length exceeded"));
389
34.7k
    }
390
34.7k
    Ok(())
391
34.9k
}
prost::encoding::merge_loop::<prost_types::ListValue, prost::encoding::message::merge<prost_types::ListValue, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
115k
pub fn merge_loop<T, M, B>(
367
115k
    value: &mut T,
368
115k
    buf: &mut B,
369
115k
    ctx: DecodeContext,
370
115k
    mut merge: M,
371
115k
) -> Result<(), DecodeError>
372
115k
where
373
115k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
115k
    B: Buf,
375
{
376
115k
    let len = decode_varint(buf)?;
377
115k
    let remaining = buf.remaining();
378
115k
    if len > remaining as u64 {
379
114
        return Err(DecodeError::new("buffer underflow"));
380
115k
    }
381
382
115k
    let limit = remaining - len as usize;
383
270k
    while buf.remaining() > limit {
384
156k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
113k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
113k
    }
390
113k
    Ok(())
391
115k
}
prost::encoding::merge_loop::<prost_types::Timestamp, prost::encoding::message::merge<prost_types::Timestamp, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
47.3k
pub fn merge_loop<T, M, B>(
367
47.3k
    value: &mut T,
368
47.3k
    buf: &mut B,
369
47.3k
    ctx: DecodeContext,
370
47.3k
    mut merge: M,
371
47.3k
) -> Result<(), DecodeError>
372
47.3k
where
373
47.3k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
47.3k
    B: Buf,
375
{
376
47.3k
    let len = decode_varint(buf)?;
377
47.3k
    let remaining = buf.remaining();
378
47.3k
    if len > remaining as u64 {
379
112
        return Err(DecodeError::new("buffer underflow"));
380
47.2k
    }
381
382
47.2k
    let limit = remaining - len as usize;
383
52.0k
    while buf.remaining() > limit {
384
4.92k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
47.1k
    if buf.remaining() != limit {
388
9
        return Err(DecodeError::new("delimited length exceeded"));
389
47.1k
    }
390
47.1k
    Ok(())
391
47.3k
}
prost::encoding::merge_loop::<alloc::string::String, prost::encoding::message::merge<alloc::string::String, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
36.4k
pub fn merge_loop<T, M, B>(
367
36.4k
    value: &mut T,
368
36.4k
    buf: &mut B,
369
36.4k
    ctx: DecodeContext,
370
36.4k
    mut merge: M,
371
36.4k
) -> Result<(), DecodeError>
372
36.4k
where
373
36.4k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
36.4k
    B: Buf,
375
{
376
36.4k
    let len = decode_varint(buf)?;
377
36.4k
    let remaining = buf.remaining();
378
36.4k
    if len > remaining as u64 {
379
104
        return Err(DecodeError::new("buffer underflow"));
380
36.3k
    }
381
382
36.3k
    let limit = remaining - len as usize;
383
38.0k
    while buf.remaining() > limit {
384
1.75k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
36.2k
    if buf.remaining() != limit {
388
4
        return Err(DecodeError::new("delimited length exceeded"));
389
36.2k
    }
390
36.2k
    Ok(())
391
36.4k
}
prost::encoding::merge_loop::<protobuf::test_messages::proto3::ForeignMessage, prost::encoding::message::merge<protobuf::test_messages::proto3::ForeignMessage, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
34.9k
pub fn merge_loop<T, M, B>(
367
34.9k
    value: &mut T,
368
34.9k
    buf: &mut B,
369
34.9k
    ctx: DecodeContext,
370
34.9k
    mut merge: M,
371
34.9k
) -> Result<(), DecodeError>
372
34.9k
where
373
34.9k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
34.9k
    B: Buf,
375
{
376
34.9k
    let len = decode_varint(buf)?;
377
34.9k
    let remaining = buf.remaining();
378
34.9k
    if len > remaining as u64 {
379
114
        return Err(DecodeError::new("buffer underflow"));
380
34.8k
    }
381
382
34.8k
    let limit = remaining - len as usize;
383
57.2k
    while buf.remaining() > limit {
384
22.4k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
34.7k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
34.7k
    }
390
34.7k
    Ok(())
391
34.9k
}
prost::encoding::merge_loop::<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, prost::encoding::message::merge<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
286k
pub fn merge_loop<T, M, B>(
367
286k
    value: &mut T,
368
286k
    buf: &mut B,
369
286k
    ctx: DecodeContext,
370
286k
    mut merge: M,
371
286k
) -> Result<(), DecodeError>
372
286k
where
373
286k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
286k
    B: Buf,
375
{
376
286k
    let len = decode_varint(buf)?;
377
286k
    let remaining = buf.remaining();
378
286k
    if len > remaining as u64 {
379
123
        return Err(DecodeError::new("buffer underflow"));
380
286k
    }
381
382
286k
    let limit = remaining - len as usize;
383
598k
    while buf.remaining() > limit {
384
313k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
285k
    if buf.remaining() != limit {
388
8
        return Err(DecodeError::new("delimited length exceeded"));
389
285k
    }
390
285k
    Ok(())
391
286k
}
prost::encoding::merge_loop::<(&mut alloc::string::String, &mut alloc::string::String), prost::encoding::btree_map::merge_with_default<alloc::string::String, alloc::string::String, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::string::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
186k
pub fn merge_loop<T, M, B>(
367
186k
    value: &mut T,
368
186k
    buf: &mut B,
369
186k
    ctx: DecodeContext,
370
186k
    mut merge: M,
371
186k
) -> Result<(), DecodeError>
372
186k
where
373
186k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
186k
    B: Buf,
375
{
376
186k
    let len = decode_varint(buf)?;
377
186k
    let remaining = buf.remaining();
378
186k
    if len > remaining as u64 {
379
69
        return Err(DecodeError::new("buffer underflow"));
380
186k
    }
381
382
186k
    let limit = remaining - len as usize;
383
321k
    while buf.remaining() > limit {
384
135k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
186k
    if buf.remaining() != limit {
388
4
        return Err(DecodeError::new("delimited length exceeded"));
389
186k
    }
390
186k
    Ok(())
391
186k
}
prost::encoding::merge_loop::<(&mut alloc::string::String, &mut alloc::vec::Vec<u8>), prost::encoding::btree_map::merge_with_default<alloc::string::String, alloc::vec::Vec<u8>, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::bytes::merge<alloc::vec::Vec<u8>, &mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
216k
pub fn merge_loop<T, M, B>(
367
216k
    value: &mut T,
368
216k
    buf: &mut B,
369
216k
    ctx: DecodeContext,
370
216k
    mut merge: M,
371
216k
) -> Result<(), DecodeError>
372
216k
where
373
216k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
216k
    B: Buf,
375
{
376
216k
    let len = decode_varint(buf)?;
377
216k
    let remaining = buf.remaining();
378
216k
    if len > remaining as u64 {
379
118
        return Err(DecodeError::new("buffer underflow"));
380
216k
    }
381
382
216k
    let limit = remaining - len as usize;
383
434k
    while buf.remaining() > limit {
384
218k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
216k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
216k
    }
390
216k
    Ok(())
391
216k
}
prost::encoding::merge_loop::<(&mut alloc::string::String, &mut prost_types::Value), prost::encoding::btree_map::merge_with_default<alloc::string::String, prost_types::Value, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<prost_types::Value, &mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
193k
pub fn merge_loop<T, M, B>(
367
193k
    value: &mut T,
368
193k
    buf: &mut B,
369
193k
    ctx: DecodeContext,
370
193k
    mut merge: M,
371
193k
) -> Result<(), DecodeError>
372
193k
where
373
193k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
193k
    B: Buf,
375
{
376
193k
    let len = decode_varint(buf)?;
377
193k
    let remaining = buf.remaining();
378
193k
    if len > remaining as u64 {
379
89
        return Err(DecodeError::new("buffer underflow"));
380
193k
    }
381
382
193k
    let limit = remaining - len as usize;
383
381k
    while buf.remaining() > limit {
384
188k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
192k
    if buf.remaining() != limit {
388
12
        return Err(DecodeError::new("delimited length exceeded"));
389
192k
    }
390
192k
    Ok(())
391
193k
}
prost::encoding::merge_loop::<(&mut alloc::string::String, &mut protobuf::test_messages::proto3::ForeignMessage), prost::encoding::btree_map::merge_with_default<alloc::string::String, protobuf::test_messages::proto3::ForeignMessage, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto3::ForeignMessage, &mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
203k
pub fn merge_loop<T, M, B>(
367
203k
    value: &mut T,
368
203k
    buf: &mut B,
369
203k
    ctx: DecodeContext,
370
203k
    mut merge: M,
371
203k
) -> Result<(), DecodeError>
372
203k
where
373
203k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
203k
    B: Buf,
375
{
376
203k
    let len = decode_varint(buf)?;
377
203k
    let remaining = buf.remaining();
378
203k
    if len > remaining as u64 {
379
102
        return Err(DecodeError::new("buffer underflow"));
380
203k
    }
381
382
203k
    let limit = remaining - len as usize;
383
404k
    while buf.remaining() > limit {
384
201k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
203k
    if buf.remaining() != limit {
388
8
        return Err(DecodeError::new("delimited length exceeded"));
389
203k
    }
390
203k
    Ok(())
391
203k
}
prost::encoding::merge_loop::<(&mut alloc::string::String, &mut protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage), prost::encoding::btree_map::merge_with_default<alloc::string::String, protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, &mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
278k
pub fn merge_loop<T, M, B>(
367
278k
    value: &mut T,
368
278k
    buf: &mut B,
369
278k
    ctx: DecodeContext,
370
278k
    mut merge: M,
371
278k
) -> Result<(), DecodeError>
372
278k
where
373
278k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
278k
    B: Buf,
375
{
376
278k
    let len = decode_varint(buf)?;
377
278k
    let remaining = buf.remaining();
378
278k
    if len > remaining as u64 {
379
101
        return Err(DecodeError::new("buffer underflow"));
380
278k
    }
381
382
278k
    let limit = remaining - len as usize;
383
558k
    while buf.remaining() > limit {
384
281k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
277k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
277k
    }
390
277k
    Ok(())
391
278k
}
prost::encoding::merge_loop::<(&mut alloc::string::String, &mut i32), prost::encoding::btree_map::merge_with_default<alloc::string::String, i32, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
203k
pub fn merge_loop<T, M, B>(
367
203k
    value: &mut T,
368
203k
    buf: &mut B,
369
203k
    ctx: DecodeContext,
370
203k
    mut merge: M,
371
203k
) -> Result<(), DecodeError>
372
203k
where
373
203k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
203k
    B: Buf,
375
{
376
203k
    let len = decode_varint(buf)?;
377
203k
    let remaining = buf.remaining();
378
203k
    if len > remaining as u64 {
379
86
        return Err(DecodeError::new("buffer underflow"));
380
203k
    }
381
382
203k
    let limit = remaining - len as usize;
383
399k
    while buf.remaining() > limit {
384
196k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
203k
    if buf.remaining() != limit {
388
4
        return Err(DecodeError::new("delimited length exceeded"));
389
203k
    }
390
203k
    Ok(())
391
203k
}
prost::encoding::merge_loop::<(&mut bool, &mut bool), prost::encoding::btree_map::merge_with_default<bool, bool, &mut &[u8], prost::encoding::bool::merge<&mut &[u8]>, prost::encoding::bool::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
21.2k
pub fn merge_loop<T, M, B>(
367
21.2k
    value: &mut T,
368
21.2k
    buf: &mut B,
369
21.2k
    ctx: DecodeContext,
370
21.2k
    mut merge: M,
371
21.2k
) -> Result<(), DecodeError>
372
21.2k
where
373
21.2k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
21.2k
    B: Buf,
375
{
376
21.2k
    let len = decode_varint(buf)?;
377
21.2k
    let remaining = buf.remaining();
378
21.2k
    if len > remaining as u64 {
379
91
        return Err(DecodeError::new("buffer underflow"));
380
21.1k
    }
381
382
21.1k
    let limit = remaining - len as usize;
383
30.5k
    while buf.remaining() > limit {
384
9.44k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
21.0k
    if buf.remaining() != limit {
388
8
        return Err(DecodeError::new("delimited length exceeded"));
389
21.0k
    }
390
21.0k
    Ok(())
391
21.2k
}
prost::encoding::merge_loop::<(&mut i32, &mut i32), prost::encoding::btree_map::merge_with_default<i32, i32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
9.12k
pub fn merge_loop<T, M, B>(
367
9.12k
    value: &mut T,
368
9.12k
    buf: &mut B,
369
9.12k
    ctx: DecodeContext,
370
9.12k
    mut merge: M,
371
9.12k
) -> Result<(), DecodeError>
372
9.12k
where
373
9.12k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
9.12k
    B: Buf,
375
{
376
9.12k
    let len = decode_varint(buf)?;
377
9.12k
    let remaining = buf.remaining();
378
9.12k
    if len > remaining as u64 {
379
106
        return Err(DecodeError::new("buffer underflow"));
380
9.01k
    }
381
382
9.01k
    let limit = remaining - len as usize;
383
16.3k
    while buf.remaining() > limit {
384
7.36k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
8.96k
    if buf.remaining() != limit {
388
4
        return Err(DecodeError::new("delimited length exceeded"));
389
8.96k
    }
390
8.96k
    Ok(())
391
9.12k
}
prost::encoding::merge_loop::<(&mut i32, &mut i32), prost::encoding::btree_map::merge_with_default<i32, i32, &mut &[u8], prost::encoding::sint32::merge<&mut &[u8]>, prost::encoding::sint32::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
14.0k
pub fn merge_loop<T, M, B>(
367
14.0k
    value: &mut T,
368
14.0k
    buf: &mut B,
369
14.0k
    ctx: DecodeContext,
370
14.0k
    mut merge: M,
371
14.0k
) -> Result<(), DecodeError>
372
14.0k
where
373
14.0k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
14.0k
    B: Buf,
375
{
376
14.0k
    let len = decode_varint(buf)?;
377
14.0k
    let remaining = buf.remaining();
378
14.0k
    if len > remaining as u64 {
379
108
        return Err(DecodeError::new("buffer underflow"));
380
13.9k
    }
381
382
13.9k
    let limit = remaining - len as usize;
383
24.8k
    while buf.remaining() > limit {
384
10.9k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
13.9k
    if buf.remaining() != limit {
388
4
        return Err(DecodeError::new("delimited length exceeded"));
389
13.9k
    }
390
13.9k
    Ok(())
391
14.0k
}
prost::encoding::merge_loop::<(&mut i32, &mut i32), prost::encoding::btree_map::merge_with_default<i32, i32, &mut &[u8], prost::encoding::sfixed32::merge<&mut &[u8]>, prost::encoding::sfixed32::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
143k
pub fn merge_loop<T, M, B>(
367
143k
    value: &mut T,
368
143k
    buf: &mut B,
369
143k
    ctx: DecodeContext,
370
143k
    mut merge: M,
371
143k
) -> Result<(), DecodeError>
372
143k
where
373
143k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
143k
    B: Buf,
375
{
376
143k
    let len = decode_varint(buf)?;
377
143k
    let remaining = buf.remaining();
378
143k
    if len > remaining as u64 {
379
108
        return Err(DecodeError::new("buffer underflow"));
380
143k
    }
381
382
143k
    let limit = remaining - len as usize;
383
263k
    while buf.remaining() > limit {
384
120k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
143k
    if buf.remaining() != limit {
388
11
        return Err(DecodeError::new("delimited length exceeded"));
389
143k
    }
390
143k
    Ok(())
391
143k
}
prost::encoding::merge_loop::<(&mut i32, &mut f64), prost::encoding::btree_map::merge_with_default<i32, f64, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::double::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
182k
pub fn merge_loop<T, M, B>(
367
182k
    value: &mut T,
368
182k
    buf: &mut B,
369
182k
    ctx: DecodeContext,
370
182k
    mut merge: M,
371
182k
) -> Result<(), DecodeError>
372
182k
where
373
182k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
182k
    B: Buf,
375
{
376
182k
    let len = decode_varint(buf)?;
377
182k
    let remaining = buf.remaining();
378
182k
    if len > remaining as u64 {
379
98
        return Err(DecodeError::new("buffer underflow"));
380
182k
    }
381
382
182k
    let limit = remaining - len as usize;
383
390k
    while buf.remaining() > limit {
384
208k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
182k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
182k
    }
390
182k
    Ok(())
391
182k
}
prost::encoding::merge_loop::<(&mut i32, &mut f32), prost::encoding::btree_map::merge_with_default<i32, f32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::float::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
97.4k
pub fn merge_loop<T, M, B>(
367
97.4k
    value: &mut T,
368
97.4k
    buf: &mut B,
369
97.4k
    ctx: DecodeContext,
370
97.4k
    mut merge: M,
371
97.4k
) -> Result<(), DecodeError>
372
97.4k
where
373
97.4k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
97.4k
    B: Buf,
375
{
376
97.4k
    let len = decode_varint(buf)?;
377
97.4k
    let remaining = buf.remaining();
378
97.4k
    if len > remaining as u64 {
379
10
        return Err(DecodeError::new("buffer underflow"));
380
97.3k
    }
381
382
97.3k
    let limit = remaining - len as usize;
383
189k
    while buf.remaining() > limit {
384
91.8k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
97.3k
    if buf.remaining() != limit {
388
8
        return Err(DecodeError::new("delimited length exceeded"));
389
97.3k
    }
390
97.3k
    Ok(())
391
97.4k
}
prost::encoding::merge_loop::<(&mut u32, &mut u32), prost::encoding::btree_map::merge_with_default<u32, u32, &mut &[u8], prost::encoding::uint32::merge<&mut &[u8]>, prost::encoding::uint32::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
35.4k
pub fn merge_loop<T, M, B>(
367
35.4k
    value: &mut T,
368
35.4k
    buf: &mut B,
369
35.4k
    ctx: DecodeContext,
370
35.4k
    mut merge: M,
371
35.4k
) -> Result<(), DecodeError>
372
35.4k
where
373
35.4k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
35.4k
    B: Buf,
375
{
376
35.4k
    let len = decode_varint(buf)?;
377
35.4k
    let remaining = buf.remaining();
378
35.4k
    if len > remaining as u64 {
379
70
        return Err(DecodeError::new("buffer underflow"));
380
35.3k
    }
381
382
35.3k
    let limit = remaining - len as usize;
383
73.0k
    while buf.remaining() > limit {
384
37.7k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
35.3k
    if buf.remaining() != limit {
388
12
        return Err(DecodeError::new("delimited length exceeded"));
389
35.2k
    }
390
35.2k
    Ok(())
391
35.4k
}
prost::encoding::merge_loop::<(&mut u32, &mut u32), prost::encoding::btree_map::merge_with_default<u32, u32, &mut &[u8], prost::encoding::fixed32::merge<&mut &[u8]>, prost::encoding::fixed32::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
208k
pub fn merge_loop<T, M, B>(
367
208k
    value: &mut T,
368
208k
    buf: &mut B,
369
208k
    ctx: DecodeContext,
370
208k
    mut merge: M,
371
208k
) -> Result<(), DecodeError>
372
208k
where
373
208k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
208k
    B: Buf,
375
{
376
208k
    let len = decode_varint(buf)?;
377
208k
    let remaining = buf.remaining();
378
208k
    if len > remaining as u64 {
379
96
        return Err(DecodeError::new("buffer underflow"));
380
208k
    }
381
382
208k
    let limit = remaining - len as usize;
383
402k
    while buf.remaining() > limit {
384
194k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
208k
    if buf.remaining() != limit {
388
18
        return Err(DecodeError::new("delimited length exceeded"));
389
208k
    }
390
208k
    Ok(())
391
208k
}
prost::encoding::merge_loop::<(&mut i64, &mut i64), prost::encoding::btree_map::merge_with_default<i64, i64, &mut &[u8], prost::encoding::int64::merge<&mut &[u8]>, prost::encoding::int64::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
17.7k
pub fn merge_loop<T, M, B>(
367
17.7k
    value: &mut T,
368
17.7k
    buf: &mut B,
369
17.7k
    ctx: DecodeContext,
370
17.7k
    mut merge: M,
371
17.7k
) -> Result<(), DecodeError>
372
17.7k
where
373
17.7k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
17.7k
    B: Buf,
375
{
376
17.7k
    let len = decode_varint(buf)?;
377
17.7k
    let remaining = buf.remaining();
378
17.7k
    if len > remaining as u64 {
379
102
        return Err(DecodeError::new("buffer underflow"));
380
17.6k
    }
381
382
17.6k
    let limit = remaining - len as usize;
383
23.9k
    while buf.remaining() > limit {
384
6.40k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
17.5k
    if buf.remaining() != limit {
388
8
        return Err(DecodeError::new("delimited length exceeded"));
389
17.5k
    }
390
17.5k
    Ok(())
391
17.7k
}
prost::encoding::merge_loop::<(&mut i64, &mut i64), prost::encoding::btree_map::merge_with_default<i64, i64, &mut &[u8], prost::encoding::sint64::merge<&mut &[u8]>, prost::encoding::sint64::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
61.2k
pub fn merge_loop<T, M, B>(
367
61.2k
    value: &mut T,
368
61.2k
    buf: &mut B,
369
61.2k
    ctx: DecodeContext,
370
61.2k
    mut merge: M,
371
61.2k
) -> Result<(), DecodeError>
372
61.2k
where
373
61.2k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
61.2k
    B: Buf,
375
{
376
61.2k
    let len = decode_varint(buf)?;
377
61.2k
    let remaining = buf.remaining();
378
61.2k
    if len > remaining as u64 {
379
58
        return Err(DecodeError::new("buffer underflow"));
380
61.1k
    }
381
382
61.1k
    let limit = remaining - len as usize;
383
91.9k
    while buf.remaining() > limit {
384
30.8k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
61.1k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
61.1k
    }
390
61.1k
    Ok(())
391
61.2k
}
prost::encoding::merge_loop::<(&mut i64, &mut i64), prost::encoding::btree_map::merge_with_default<i64, i64, &mut &[u8], prost::encoding::sfixed64::merge<&mut &[u8]>, prost::encoding::sfixed64::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
296k
pub fn merge_loop<T, M, B>(
367
296k
    value: &mut T,
368
296k
    buf: &mut B,
369
296k
    ctx: DecodeContext,
370
296k
    mut merge: M,
371
296k
) -> Result<(), DecodeError>
372
296k
where
373
296k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
296k
    B: Buf,
375
{
376
296k
    let len = decode_varint(buf)?;
377
296k
    let remaining = buf.remaining();
378
296k
    if len > remaining as u64 {
379
62
        return Err(DecodeError::new("buffer underflow"));
380
295k
    }
381
382
295k
    let limit = remaining - len as usize;
383
518k
    while buf.remaining() > limit {
384
222k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
295k
    if buf.remaining() != limit {
388
10
        return Err(DecodeError::new("delimited length exceeded"));
389
295k
    }
390
295k
    Ok(())
391
296k
}
prost::encoding::merge_loop::<(&mut u64, &mut u64), prost::encoding::btree_map::merge_with_default<u64, u64, &mut &[u8], prost::encoding::uint64::merge<&mut &[u8]>, prost::encoding::uint64::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
50.6k
pub fn merge_loop<T, M, B>(
367
50.6k
    value: &mut T,
368
50.6k
    buf: &mut B,
369
50.6k
    ctx: DecodeContext,
370
50.6k
    mut merge: M,
371
50.6k
) -> Result<(), DecodeError>
372
50.6k
where
373
50.6k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
50.6k
    B: Buf,
375
{
376
50.6k
    let len = decode_varint(buf)?;
377
50.6k
    let remaining = buf.remaining();
378
50.6k
    if len > remaining as u64 {
379
93
        return Err(DecodeError::new("buffer underflow"));
380
50.5k
    }
381
382
50.5k
    let limit = remaining - len as usize;
383
77.5k
    while buf.remaining() > limit {
384
27.0k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
50.4k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
50.4k
    }
390
50.4k
    Ok(())
391
50.6k
}
prost::encoding::merge_loop::<(&mut u64, &mut u64), prost::encoding::btree_map::merge_with_default<u64, u64, &mut &[u8], prost::encoding::fixed64::merge<&mut &[u8]>, prost::encoding::fixed64::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
159k
pub fn merge_loop<T, M, B>(
367
159k
    value: &mut T,
368
159k
    buf: &mut B,
369
159k
    ctx: DecodeContext,
370
159k
    mut merge: M,
371
159k
) -> Result<(), DecodeError>
372
159k
where
373
159k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
159k
    B: Buf,
375
{
376
159k
    let len = decode_varint(buf)?;
377
159k
    let remaining = buf.remaining();
378
159k
    if len > remaining as u64 {
379
60
        return Err(DecodeError::new("buffer underflow"));
380
159k
    }
381
382
159k
    let limit = remaining - len as usize;
383
303k
    while buf.remaining() > limit {
384
144k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
158k
    if buf.remaining() != limit {
388
10
        return Err(DecodeError::new("delimited length exceeded"));
389
158k
    }
390
158k
    Ok(())
391
159k
}
prost::encoding::merge_loop::<bool, prost::encoding::message::merge<bool, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
19.2k
pub fn merge_loop<T, M, B>(
367
19.2k
    value: &mut T,
368
19.2k
    buf: &mut B,
369
19.2k
    ctx: DecodeContext,
370
19.2k
    mut merge: M,
371
19.2k
) -> Result<(), DecodeError>
372
19.2k
where
373
19.2k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
19.2k
    B: Buf,
375
{
376
19.2k
    let len = decode_varint(buf)?;
377
19.2k
    let remaining = buf.remaining();
378
19.2k
    if len > remaining as u64 {
379
114
        return Err(DecodeError::new("buffer underflow"));
380
19.1k
    }
381
382
19.1k
    let limit = remaining - len as usize;
383
34.0k
    while buf.remaining() > limit {
384
14.9k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
19.1k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
19.0k
    }
390
19.0k
    Ok(())
391
19.2k
}
prost::encoding::merge_loop::<f64, prost::encoding::message::merge<f64, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
16.0k
pub fn merge_loop<T, M, B>(
367
16.0k
    value: &mut T,
368
16.0k
    buf: &mut B,
369
16.0k
    ctx: DecodeContext,
370
16.0k
    mut merge: M,
371
16.0k
) -> Result<(), DecodeError>
372
16.0k
where
373
16.0k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
16.0k
    B: Buf,
375
{
376
16.0k
    let len = decode_varint(buf)?;
377
16.0k
    let remaining = buf.remaining();
378
16.0k
    if len > remaining as u64 {
379
98
        return Err(DecodeError::new("buffer underflow"));
380
15.9k
    }
381
382
15.9k
    let limit = remaining - len as usize;
383
16.3k
    while buf.remaining() > limit {
384
533
        merge(value, buf, ctx.clone())?;
385
    }
386
387
15.8k
    if buf.remaining() != limit {
388
5
        return Err(DecodeError::new("delimited length exceeded"));
389
15.8k
    }
390
15.8k
    Ok(())
391
16.0k
}
prost::encoding::merge_loop::<f32, prost::encoding::message::merge<f32, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
93.6k
pub fn merge_loop<T, M, B>(
367
93.6k
    value: &mut T,
368
93.6k
    buf: &mut B,
369
93.6k
    ctx: DecodeContext,
370
93.6k
    mut merge: M,
371
93.6k
) -> Result<(), DecodeError>
372
93.6k
where
373
93.6k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
93.6k
    B: Buf,
375
{
376
93.6k
    let len = decode_varint(buf)?;
377
93.6k
    let remaining = buf.remaining();
378
93.6k
    if len > remaining as u64 {
379
98
        return Err(DecodeError::new("buffer underflow"));
380
93.5k
    }
381
382
93.5k
    let limit = remaining - len as usize;
383
94.2k
    while buf.remaining() > limit {
384
751
        merge(value, buf, ctx.clone())?;
385
    }
386
387
93.4k
    if buf.remaining() != limit {
388
16
        return Err(DecodeError::new("delimited length exceeded"));
389
93.4k
    }
390
93.4k
    Ok(())
391
93.6k
}
prost::encoding::merge_loop::<i32, prost::encoding::message::merge<i32, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
33.0k
pub fn merge_loop<T, M, B>(
367
33.0k
    value: &mut T,
368
33.0k
    buf: &mut B,
369
33.0k
    ctx: DecodeContext,
370
33.0k
    mut merge: M,
371
33.0k
) -> Result<(), DecodeError>
372
33.0k
where
373
33.0k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
33.0k
    B: Buf,
375
{
376
33.0k
    let len = decode_varint(buf)?;
377
33.0k
    let remaining = buf.remaining();
378
33.0k
    if len > remaining as u64 {
379
114
        return Err(DecodeError::new("buffer underflow"));
380
32.9k
    }
381
382
32.9k
    let limit = remaining - len as usize;
383
68.8k
    while buf.remaining() > limit {
384
35.9k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
32.8k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
32.8k
    }
390
32.8k
    Ok(())
391
33.0k
}
prost::encoding::merge_loop::<u32, prost::encoding::message::merge<u32, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
8.04k
pub fn merge_loop<T, M, B>(
367
8.04k
    value: &mut T,
368
8.04k
    buf: &mut B,
369
8.04k
    ctx: DecodeContext,
370
8.04k
    mut merge: M,
371
8.04k
) -> Result<(), DecodeError>
372
8.04k
where
373
8.04k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
8.04k
    B: Buf,
375
{
376
8.04k
    let len = decode_varint(buf)?;
377
8.02k
    let remaining = buf.remaining();
378
8.02k
    if len > remaining as u64 {
379
95
        return Err(DecodeError::new("buffer underflow"));
380
7.93k
    }
381
382
7.93k
    let limit = remaining - len as usize;
383
13.1k
    while buf.remaining() > limit {
384
5.28k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
7.87k
    if buf.remaining() != limit {
388
4
        return Err(DecodeError::new("delimited length exceeded"));
389
7.86k
    }
390
7.86k
    Ok(())
391
8.04k
}
prost::encoding::merge_loop::<i64, prost::encoding::message::merge<i64, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
51.9k
pub fn merge_loop<T, M, B>(
367
51.9k
    value: &mut T,
368
51.9k
    buf: &mut B,
369
51.9k
    ctx: DecodeContext,
370
51.9k
    mut merge: M,
371
51.9k
) -> Result<(), DecodeError>
372
51.9k
where
373
51.9k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
51.9k
    B: Buf,
375
{
376
51.9k
    let len = decode_varint(buf)?;
377
51.9k
    let remaining = buf.remaining();
378
51.9k
    if len > remaining as u64 {
379
76
        return Err(DecodeError::new("buffer underflow"));
380
51.8k
    }
381
382
51.8k
    let limit = remaining - len as usize;
383
54.4k
    while buf.remaining() > limit {
384
2.59k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
51.8k
    if buf.remaining() != limit {
388
14
        return Err(DecodeError::new("delimited length exceeded"));
389
51.8k
    }
390
51.8k
    Ok(())
391
51.9k
}
prost::encoding::merge_loop::<u64, prost::encoding::message::merge<u64, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
75.1k
pub fn merge_loop<T, M, B>(
367
75.1k
    value: &mut T,
368
75.1k
    buf: &mut B,
369
75.1k
    ctx: DecodeContext,
370
75.1k
    mut merge: M,
371
75.1k
) -> Result<(), DecodeError>
372
75.1k
where
373
75.1k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
75.1k
    B: Buf,
375
{
376
75.1k
    let len = decode_varint(buf)?;
377
75.1k
    let remaining = buf.remaining();
378
75.1k
    if len > remaining as u64 {
379
83
        return Err(DecodeError::new("buffer underflow"));
380
75.0k
    }
381
382
75.0k
    let limit = remaining - len as usize;
383
78.2k
    while buf.remaining() > limit {
384
3.16k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
75.0k
    if buf.remaining() != limit {
388
1
        return Err(DecodeError::new("delimited length exceeded"));
389
75.0k
    }
390
75.0k
    Ok(())
391
75.1k
}
Unexecuted instantiation: prost::encoding::merge_loop::<_, _, _>
prost::encoding::merge_loop::<alloc::vec::Vec<bool>, prost::encoding::bool::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
6.42k
pub fn merge_loop<T, M, B>(
367
6.42k
    value: &mut T,
368
6.42k
    buf: &mut B,
369
6.42k
    ctx: DecodeContext,
370
6.42k
    mut merge: M,
371
6.42k
) -> Result<(), DecodeError>
372
6.42k
where
373
6.42k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
6.42k
    B: Buf,
375
{
376
6.42k
    let len = decode_varint(buf)?;
377
6.41k
    let remaining = buf.remaining();
378
6.41k
    if len > remaining as u64 {
379
120
        return Err(DecodeError::new("buffer underflow"));
380
6.29k
    }
381
382
6.29k
    let limit = remaining - len as usize;
383
7.13M
    while buf.remaining() > limit {
384
7.13M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
6.29k
    if buf.remaining() != limit {
388
2
        return Err(DecodeError::new("delimited length exceeded"));
389
6.29k
    }
390
6.29k
    Ok(())
391
6.42k
}
prost::encoding::merge_loop::<alloc::vec::Vec<f64>, prost::encoding::double::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
20.8k
pub fn merge_loop<T, M, B>(
367
20.8k
    value: &mut T,
368
20.8k
    buf: &mut B,
369
20.8k
    ctx: DecodeContext,
370
20.8k
    mut merge: M,
371
20.8k
) -> Result<(), DecodeError>
372
20.8k
where
373
20.8k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
20.8k
    B: Buf,
375
{
376
20.8k
    let len = decode_varint(buf)?;
377
20.8k
    let remaining = buf.remaining();
378
20.8k
    if len > remaining as u64 {
379
75
        return Err(DecodeError::new("buffer underflow"));
380
20.7k
    }
381
382
20.7k
    let limit = remaining - len as usize;
383
136k
    while buf.remaining() > limit {
384
115k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
20.7k
    if buf.remaining() != limit {
388
14
        return Err(DecodeError::new("delimited length exceeded"));
389
20.7k
    }
390
20.7k
    Ok(())
391
20.8k
}
prost::encoding::merge_loop::<alloc::vec::Vec<f32>, prost::encoding::float::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
18.1k
pub fn merge_loop<T, M, B>(
367
18.1k
    value: &mut T,
368
18.1k
    buf: &mut B,
369
18.1k
    ctx: DecodeContext,
370
18.1k
    mut merge: M,
371
18.1k
) -> Result<(), DecodeError>
372
18.1k
where
373
18.1k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
18.1k
    B: Buf,
375
{
376
18.1k
    let len = decode_varint(buf)?;
377
18.1k
    let remaining = buf.remaining();
378
18.1k
    if len > remaining as u64 {
379
120
        return Err(DecodeError::new("buffer underflow"));
380
18.0k
    }
381
382
18.0k
    let limit = remaining - len as usize;
383
282k
    while buf.remaining() > limit {
384
264k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
18.0k
    if buf.remaining() != limit {
388
10
        return Err(DecodeError::new("delimited length exceeded"));
389
18.0k
    }
390
18.0k
    Ok(())
391
18.1k
}
prost::encoding::merge_loop::<alloc::vec::Vec<i32>, prost::encoding::int32::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
21.0k
pub fn merge_loop<T, M, B>(
367
21.0k
    value: &mut T,
368
21.0k
    buf: &mut B,
369
21.0k
    ctx: DecodeContext,
370
21.0k
    mut merge: M,
371
21.0k
) -> Result<(), DecodeError>
372
21.0k
where
373
21.0k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
21.0k
    B: Buf,
375
{
376
21.0k
    let len = decode_varint(buf)?;
377
21.0k
    let remaining = buf.remaining();
378
21.0k
    if len > remaining as u64 {
379
106
        return Err(DecodeError::new("buffer underflow"));
380
20.8k
    }
381
382
20.8k
    let limit = remaining - len as usize;
383
12.3M
    while buf.remaining() > limit {
384
12.3M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
20.8k
    if buf.remaining() != limit {
388
20
        return Err(DecodeError::new("delimited length exceeded"));
389
20.8k
    }
390
20.8k
    Ok(())
391
21.0k
}
prost::encoding::merge_loop::<alloc::vec::Vec<i32>, prost::encoding::sint32::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
7.19k
pub fn merge_loop<T, M, B>(
367
7.19k
    value: &mut T,
368
7.19k
    buf: &mut B,
369
7.19k
    ctx: DecodeContext,
370
7.19k
    mut merge: M,
371
7.19k
) -> Result<(), DecodeError>
372
7.19k
where
373
7.19k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
7.19k
    B: Buf,
375
{
376
7.19k
    let len = decode_varint(buf)?;
377
7.18k
    let remaining = buf.remaining();
378
7.18k
    if len > remaining as u64 {
379
106
        return Err(DecodeError::new("buffer underflow"));
380
7.08k
    }
381
382
7.08k
    let limit = remaining - len as usize;
383
162M
    while buf.remaining() > limit {
384
162M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
7.08k
    if buf.remaining() != limit {
388
14
        return Err(DecodeError::new("delimited length exceeded"));
389
7.06k
    }
390
7.06k
    Ok(())
391
7.19k
}
prost::encoding::merge_loop::<alloc::vec::Vec<i32>, prost::encoding::sfixed32::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
8.33k
pub fn merge_loop<T, M, B>(
367
8.33k
    value: &mut T,
368
8.33k
    buf: &mut B,
369
8.33k
    ctx: DecodeContext,
370
8.33k
    mut merge: M,
371
8.33k
) -> Result<(), DecodeError>
372
8.33k
where
373
8.33k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
8.33k
    B: Buf,
375
{
376
8.33k
    let len = decode_varint(buf)?;
377
8.33k
    let remaining = buf.remaining();
378
8.33k
    if len > remaining as u64 {
379
114
        return Err(DecodeError::new("buffer underflow"));
380
8.21k
    }
381
382
8.21k
    let limit = remaining - len as usize;
383
335k
    while buf.remaining() > limit {
384
327k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
8.21k
    if buf.remaining() != limit {
388
6
        return Err(DecodeError::new("delimited length exceeded"));
389
8.20k
    }
390
8.20k
    Ok(())
391
8.33k
}
prost::encoding::merge_loop::<alloc::vec::Vec<u32>, prost::encoding::uint32::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
8.40k
pub fn merge_loop<T, M, B>(
367
8.40k
    value: &mut T,
368
8.40k
    buf: &mut B,
369
8.40k
    ctx: DecodeContext,
370
8.40k
    mut merge: M,
371
8.40k
) -> Result<(), DecodeError>
372
8.40k
where
373
8.40k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
8.40k
    B: Buf,
375
{
376
8.40k
    let len = decode_varint(buf)?;
377
8.40k
    let remaining = buf.remaining();
378
8.40k
    if len > remaining as u64 {
379
112
        return Err(DecodeError::new("buffer underflow"));
380
8.28k
    }
381
382
8.28k
    let limit = remaining - len as usize;
383
17.9M
    while buf.remaining() > limit {
384
17.9M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
8.28k
    if buf.remaining() != limit {
388
1
        return Err(DecodeError::new("delimited length exceeded"));
389
8.28k
    }
390
8.28k
    Ok(())
391
8.40k
}
prost::encoding::merge_loop::<alloc::vec::Vec<u32>, prost::encoding::fixed32::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
4.80k
pub fn merge_loop<T, M, B>(
367
4.80k
    value: &mut T,
368
4.80k
    buf: &mut B,
369
4.80k
    ctx: DecodeContext,
370
4.80k
    mut merge: M,
371
4.80k
) -> Result<(), DecodeError>
372
4.80k
where
373
4.80k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
4.80k
    B: Buf,
375
{
376
4.80k
    let len = decode_varint(buf)?;
377
4.79k
    let remaining = buf.remaining();
378
4.79k
    if len > remaining as u64 {
379
105
        return Err(DecodeError::new("buffer underflow"));
380
4.69k
    }
381
382
4.69k
    let limit = remaining - len as usize;
383
32.3k
    while buf.remaining() > limit {
384
27.7k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
4.68k
    if buf.remaining() != limit {
388
1
        return Err(DecodeError::new("delimited length exceeded"));
389
4.68k
    }
390
4.68k
    Ok(())
391
4.80k
}
prost::encoding::merge_loop::<alloc::vec::Vec<i64>, prost::encoding::int64::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
12.8k
pub fn merge_loop<T, M, B>(
367
12.8k
    value: &mut T,
368
12.8k
    buf: &mut B,
369
12.8k
    ctx: DecodeContext,
370
12.8k
    mut merge: M,
371
12.8k
) -> Result<(), DecodeError>
372
12.8k
where
373
12.8k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
12.8k
    B: Buf,
375
{
376
12.8k
    let len = decode_varint(buf)?;
377
12.8k
    let remaining = buf.remaining();
378
12.8k
    if len > remaining as u64 {
379
120
        return Err(DecodeError::new("buffer underflow"));
380
12.7k
    }
381
382
12.7k
    let limit = remaining - len as usize;
383
44.9M
    while buf.remaining() > limit {
384
44.9M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
12.7k
    if buf.remaining() != limit {
388
17
        return Err(DecodeError::new("delimited length exceeded"));
389
12.6k
    }
390
12.6k
    Ok(())
391
12.8k
}
prost::encoding::merge_loop::<alloc::vec::Vec<i64>, prost::encoding::sint64::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
16.0k
pub fn merge_loop<T, M, B>(
367
16.0k
    value: &mut T,
368
16.0k
    buf: &mut B,
369
16.0k
    ctx: DecodeContext,
370
16.0k
    mut merge: M,
371
16.0k
) -> Result<(), DecodeError>
372
16.0k
where
373
16.0k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
16.0k
    B: Buf,
375
{
376
16.0k
    let len = decode_varint(buf)?;
377
16.0k
    let remaining = buf.remaining();
378
16.0k
    if len > remaining as u64 {
379
119
        return Err(DecodeError::new("buffer underflow"));
380
15.8k
    }
381
382
15.8k
    let limit = remaining - len as usize;
383
17.0M
    while buf.remaining() > limit {
384
17.0M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
15.8k
    if buf.remaining() != limit {
388
20
        return Err(DecodeError::new("delimited length exceeded"));
389
15.8k
    }
390
15.8k
    Ok(())
391
16.0k
}
prost::encoding::merge_loop::<alloc::vec::Vec<i64>, prost::encoding::sfixed64::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
23.3k
pub fn merge_loop<T, M, B>(
367
23.3k
    value: &mut T,
368
23.3k
    buf: &mut B,
369
23.3k
    ctx: DecodeContext,
370
23.3k
    mut merge: M,
371
23.3k
) -> Result<(), DecodeError>
372
23.3k
where
373
23.3k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
23.3k
    B: Buf,
375
{
376
23.3k
    let len = decode_varint(buf)?;
377
23.3k
    let remaining = buf.remaining();
378
23.3k
    if len > remaining as u64 {
379
107
        return Err(DecodeError::new("buffer underflow"));
380
23.2k
    }
381
382
23.2k
    let limit = remaining - len as usize;
383
173k
    while buf.remaining() > limit {
384
150k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
23.2k
    if buf.remaining() != limit {
388
1
        return Err(DecodeError::new("delimited length exceeded"));
389
23.2k
    }
390
23.2k
    Ok(())
391
23.3k
}
prost::encoding::merge_loop::<alloc::vec::Vec<u64>, prost::encoding::uint64::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
18.8k
pub fn merge_loop<T, M, B>(
367
18.8k
    value: &mut T,
368
18.8k
    buf: &mut B,
369
18.8k
    ctx: DecodeContext,
370
18.8k
    mut merge: M,
371
18.8k
) -> Result<(), DecodeError>
372
18.8k
where
373
18.8k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
18.8k
    B: Buf,
375
{
376
18.8k
    let len = decode_varint(buf)?;
377
18.8k
    let remaining = buf.remaining();
378
18.8k
    if len > remaining as u64 {
379
55
        return Err(DecodeError::new("buffer underflow"));
380
18.8k
    }
381
382
18.8k
    let limit = remaining - len as usize;
383
15.8M
    while buf.remaining() > limit {
384
15.8M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
18.8k
    if buf.remaining() != limit {
388
11
        return Err(DecodeError::new("delimited length exceeded"));
389
18.7k
    }
390
18.7k
    Ok(())
391
18.8k
}
prost::encoding::merge_loop::<alloc::vec::Vec<u64>, prost::encoding::fixed64::merge_repeated<&mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
7.09k
pub fn merge_loop<T, M, B>(
367
7.09k
    value: &mut T,
368
7.09k
    buf: &mut B,
369
7.09k
    ctx: DecodeContext,
370
7.09k
    mut merge: M,
371
7.09k
) -> Result<(), DecodeError>
372
7.09k
where
373
7.09k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
7.09k
    B: Buf,
375
{
376
7.09k
    let len = decode_varint(buf)?;
377
7.09k
    let remaining = buf.remaining();
378
7.09k
    if len > remaining as u64 {
379
116
        return Err(DecodeError::new("buffer underflow"));
380
6.98k
    }
381
382
6.98k
    let limit = remaining - len as usize;
383
54.0k
    while buf.remaining() > limit {
384
47.0k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
6.97k
    if buf.remaining() != limit {
388
5
        return Err(DecodeError::new("delimited length exceeded"));
389
6.97k
    }
390
6.97k
    Ok(())
391
7.09k
}
prost::encoding::merge_loop::<alloc::boxed::Box<protobuf::test_messages::proto2::TestAllTypesProto2>, prost::encoding::message::merge<alloc::boxed::Box<protobuf::test_messages::proto2::TestAllTypesProto2>, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
237k
pub fn merge_loop<T, M, B>(
367
237k
    value: &mut T,
368
237k
    buf: &mut B,
369
237k
    ctx: DecodeContext,
370
237k
    mut merge: M,
371
237k
) -> Result<(), DecodeError>
372
237k
where
373
237k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
237k
    B: Buf,
375
{
376
237k
    let len = decode_varint(buf)?;
377
237k
    let remaining = buf.remaining();
378
237k
    if len > remaining as u64 {
379
645
        return Err(DecodeError::new("buffer underflow"));
380
237k
    }
381
382
237k
    let limit = remaining - len as usize;
383
3.68M
    while buf.remaining() > limit {
384
3.46M
        merge(value, buf, ctx.clone())?;
385
    }
386
387
216k
    if buf.remaining() != limit {
388
50
        return Err(DecodeError::new("delimited length exceeded"));
389
216k
    }
390
216k
    Ok(())
391
237k
}
prost::encoding::merge_loop::<alloc::boxed::Box<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>, prost::encoding::message::merge<alloc::boxed::Box<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
17.6k
pub fn merge_loop<T, M, B>(
367
17.6k
    value: &mut T,
368
17.6k
    buf: &mut B,
369
17.6k
    ctx: DecodeContext,
370
17.6k
    mut merge: M,
371
17.6k
) -> Result<(), DecodeError>
372
17.6k
where
373
17.6k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
17.6k
    B: Buf,
375
{
376
17.6k
    let len = decode_varint(buf)?;
377
17.6k
    let remaining = buf.remaining();
378
17.6k
    if len > remaining as u64 {
379
114
        return Err(DecodeError::new("buffer underflow"));
380
17.4k
    }
381
382
17.4k
    let limit = remaining - len as usize;
383
29.1k
    while buf.remaining() > limit {
384
12.0k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
17.0k
    if buf.remaining() != limit {
388
2
        return Err(DecodeError::new("delimited length exceeded"));
389
17.0k
    }
390
17.0k
    Ok(())
391
17.6k
}
prost::encoding::merge_loop::<protobuf::test_messages::proto2::ForeignMessageProto2, prost::encoding::message::merge<protobuf::test_messages::proto2::ForeignMessageProto2, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
25.2k
pub fn merge_loop<T, M, B>(
367
25.2k
    value: &mut T,
368
25.2k
    buf: &mut B,
369
25.2k
    ctx: DecodeContext,
370
25.2k
    mut merge: M,
371
25.2k
) -> Result<(), DecodeError>
372
25.2k
where
373
25.2k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
25.2k
    B: Buf,
375
{
376
25.2k
    let len = decode_varint(buf)?;
377
25.2k
    let remaining = buf.remaining();
378
25.2k
    if len > remaining as u64 {
379
101
        return Err(DecodeError::new("buffer underflow"));
380
25.1k
    }
381
382
25.1k
    let limit = remaining - len as usize;
383
46.7k
    while buf.remaining() > limit {
384
21.6k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
25.0k
    if buf.remaining() != limit {
388
2
        return Err(DecodeError::new("delimited length exceeded"));
389
25.0k
    }
390
25.0k
    Ok(())
391
25.2k
}
prost::encoding::merge_loop::<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, prost::encoding::message::merge<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, &mut &[u8]>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
191k
pub fn merge_loop<T, M, B>(
367
191k
    value: &mut T,
368
191k
    buf: &mut B,
369
191k
    ctx: DecodeContext,
370
191k
    mut merge: M,
371
191k
) -> Result<(), DecodeError>
372
191k
where
373
191k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
191k
    B: Buf,
375
{
376
191k
    let len = decode_varint(buf)?;
377
191k
    let remaining = buf.remaining();
378
191k
    if len > remaining as u64 {
379
45
        return Err(DecodeError::new("buffer underflow"));
380
191k
    }
381
382
191k
    let limit = remaining - len as usize;
383
397k
    while buf.remaining() > limit {
384
207k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
190k
    if buf.remaining() != limit {
388
6
        return Err(DecodeError::new("delimited length exceeded"));
389
190k
    }
390
190k
    Ok(())
391
191k
}
prost::encoding::merge_loop::<(&mut alloc::string::String, &mut alloc::string::String), prost::encoding::btree_map::merge_with_default<alloc::string::String, alloc::string::String, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::string::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
151k
pub fn merge_loop<T, M, B>(
367
151k
    value: &mut T,
368
151k
    buf: &mut B,
369
151k
    ctx: DecodeContext,
370
151k
    mut merge: M,
371
151k
) -> Result<(), DecodeError>
372
151k
where
373
151k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
151k
    B: Buf,
375
{
376
151k
    let len = decode_varint(buf)?;
377
151k
    let remaining = buf.remaining();
378
151k
    if len > remaining as u64 {
379
120
        return Err(DecodeError::new("buffer underflow"));
380
151k
    }
381
382
151k
    let limit = remaining - len as usize;
383
294k
    while buf.remaining() > limit {
384
142k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
151k
    if buf.remaining() != limit {
388
3
        return Err(DecodeError::new("delimited length exceeded"));
389
151k
    }
390
151k
    Ok(())
391
151k
}
prost::encoding::merge_loop::<(&mut alloc::string::String, &mut alloc::vec::Vec<u8>), prost::encoding::btree_map::merge_with_default<alloc::string::String, alloc::vec::Vec<u8>, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::bytes::merge<alloc::vec::Vec<u8>, &mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
226k
pub fn merge_loop<T, M, B>(
367
226k
    value: &mut T,
368
226k
    buf: &mut B,
369
226k
    ctx: DecodeContext,
370
226k
    mut merge: M,
371
226k
) -> Result<(), DecodeError>
372
226k
where
373
226k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
226k
    B: Buf,
375
{
376
226k
    let len = decode_varint(buf)?;
377
226k
    let remaining = buf.remaining();
378
226k
    if len > remaining as u64 {
379
122
        return Err(DecodeError::new("buffer underflow"));
380
226k
    }
381
382
226k
    let limit = remaining - len as usize;
383
443k
    while buf.remaining() > limit {
384
217k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
226k
    if buf.remaining() != limit {
388
19
        return Err(DecodeError::new("delimited length exceeded"));
389
226k
    }
390
226k
    Ok(())
391
226k
}
prost::encoding::merge_loop::<(&mut alloc::string::String, &mut protobuf::test_messages::proto2::ForeignMessageProto2), prost::encoding::btree_map::merge_with_default<alloc::string::String, protobuf::test_messages::proto2::ForeignMessageProto2, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto2::ForeignMessageProto2, &mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
165k
pub fn merge_loop<T, M, B>(
367
165k
    value: &mut T,
368
165k
    buf: &mut B,
369
165k
    ctx: DecodeContext,
370
165k
    mut merge: M,
371
165k
) -> Result<(), DecodeError>
372
165k
where
373
165k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
165k
    B: Buf,
375
{
376
165k
    let len = decode_varint(buf)?;
377
165k
    let remaining = buf.remaining();
378
165k
    if len > remaining as u64 {
379
111
        return Err(DecodeError::new("buffer underflow"));
380
165k
    }
381
382
165k
    let limit = remaining - len as usize;
383
383k
    while buf.remaining() > limit {
384
218k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
165k
    if buf.remaining() != limit {
388
12
        return Err(DecodeError::new("delimited length exceeded"));
389
164k
    }
390
164k
    Ok(())
391
165k
}
prost::encoding::merge_loop::<(&mut alloc::string::String, &mut protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage), prost::encoding::btree_map::merge_with_default<alloc::string::String, protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, &mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
249k
pub fn merge_loop<T, M, B>(
367
249k
    value: &mut T,
368
249k
    buf: &mut B,
369
249k
    ctx: DecodeContext,
370
249k
    mut merge: M,
371
249k
) -> Result<(), DecodeError>
372
249k
where
373
249k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
249k
    B: Buf,
375
{
376
249k
    let len = decode_varint(buf)?;
377
249k
    let remaining = buf.remaining();
378
249k
    if len > remaining as u64 {
379
107
        return Err(DecodeError::new("buffer underflow"));
380
248k
    }
381
382
248k
    let limit = remaining - len as usize;
383
488k
    while buf.remaining() > limit {
384
239k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
248k
    if buf.remaining() != limit {
388
6
        return Err(DecodeError::new("delimited length exceeded"));
389
248k
    }
390
248k
    Ok(())
391
249k
}
prost::encoding::merge_loop::<(&mut alloc::string::String, &mut i32), prost::encoding::btree_map::merge_with_default<alloc::string::String, i32, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
267k
pub fn merge_loop<T, M, B>(
367
267k
    value: &mut T,
368
267k
    buf: &mut B,
369
267k
    ctx: DecodeContext,
370
267k
    mut merge: M,
371
267k
) -> Result<(), DecodeError>
372
267k
where
373
267k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
267k
    B: Buf,
375
{
376
267k
    let len = decode_varint(buf)?;
377
267k
    let remaining = buf.remaining();
378
267k
    if len > remaining as u64 {
379
130
        return Err(DecodeError::new("buffer underflow"));
380
267k
    }
381
382
267k
    let limit = remaining - len as usize;
383
540k
    while buf.remaining() > limit {
384
273k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
266k
    if buf.remaining() != limit {
388
16
        return Err(DecodeError::new("delimited length exceeded"));
389
266k
    }
390
266k
    Ok(())
391
267k
}
prost::encoding::merge_loop::<(&mut bool, &mut bool), prost::encoding::btree_map::merge_with_default<bool, bool, &mut &[u8], prost::encoding::bool::merge<&mut &[u8]>, prost::encoding::bool::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
11.7k
pub fn merge_loop<T, M, B>(
367
11.7k
    value: &mut T,
368
11.7k
    buf: &mut B,
369
11.7k
    ctx: DecodeContext,
370
11.7k
    mut merge: M,
371
11.7k
) -> Result<(), DecodeError>
372
11.7k
where
373
11.7k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
11.7k
    B: Buf,
375
{
376
11.7k
    let len = decode_varint(buf)?;
377
11.7k
    let remaining = buf.remaining();
378
11.7k
    if len > remaining as u64 {
379
109
        return Err(DecodeError::new("buffer underflow"));
380
11.6k
    }
381
382
11.6k
    let limit = remaining - len as usize;
383
19.3k
    while buf.remaining() > limit {
384
7.78k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
11.5k
    if buf.remaining() != limit {
388
14
        return Err(DecodeError::new("delimited length exceeded"));
389
11.5k
    }
390
11.5k
    Ok(())
391
11.7k
}
prost::encoding::merge_loop::<(&mut i32, &mut i32), prost::encoding::btree_map::merge_with_default<i32, i32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
8.08k
pub fn merge_loop<T, M, B>(
367
8.08k
    value: &mut T,
368
8.08k
    buf: &mut B,
369
8.08k
    ctx: DecodeContext,
370
8.08k
    mut merge: M,
371
8.08k
) -> Result<(), DecodeError>
372
8.08k
where
373
8.08k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
8.08k
    B: Buf,
375
{
376
8.08k
    let len = decode_varint(buf)?;
377
8.07k
    let remaining = buf.remaining();
378
8.07k
    if len > remaining as u64 {
379
41
        return Err(DecodeError::new("buffer underflow"));
380
8.03k
    }
381
382
8.03k
    let limit = remaining - len as usize;
383
15.0k
    while buf.remaining() > limit {
384
7.00k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
8.01k
    if buf.remaining() != limit {
388
2
        return Err(DecodeError::new("delimited length exceeded"));
389
8.01k
    }
390
8.01k
    Ok(())
391
8.08k
}
prost::encoding::merge_loop::<(&mut i32, &mut i32), prost::encoding::btree_map::merge_with_default<i32, i32, &mut &[u8], prost::encoding::sint32::merge<&mut &[u8]>, prost::encoding::sint32::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
37.6k
pub fn merge_loop<T, M, B>(
367
37.6k
    value: &mut T,
368
37.6k
    buf: &mut B,
369
37.6k
    ctx: DecodeContext,
370
37.6k
    mut merge: M,
371
37.6k
) -> Result<(), DecodeError>
372
37.6k
where
373
37.6k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
37.6k
    B: Buf,
375
{
376
37.6k
    let len = decode_varint(buf)?;
377
37.6k
    let remaining = buf.remaining();
378
37.6k
    if len > remaining as u64 {
379
109
        return Err(DecodeError::new("buffer underflow"));
380
37.5k
    }
381
382
37.5k
    let limit = remaining - len as usize;
383
78.8k
    while buf.remaining() > limit {
384
41.3k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
37.4k
    if buf.remaining() != limit {
388
7
        return Err(DecodeError::new("delimited length exceeded"));
389
37.4k
    }
390
37.4k
    Ok(())
391
37.6k
}
prost::encoding::merge_loop::<(&mut i32, &mut i32), prost::encoding::btree_map::merge_with_default<i32, i32, &mut &[u8], prost::encoding::sfixed32::merge<&mut &[u8]>, prost::encoding::sfixed32::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
166k
pub fn merge_loop<T, M, B>(
367
166k
    value: &mut T,
368
166k
    buf: &mut B,
369
166k
    ctx: DecodeContext,
370
166k
    mut merge: M,
371
166k
) -> Result<(), DecodeError>
372
166k
where
373
166k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
166k
    B: Buf,
375
{
376
166k
    let len = decode_varint(buf)?;
377
166k
    let remaining = buf.remaining();
378
166k
    if len > remaining as u64 {
379
114
        return Err(DecodeError::new("buffer underflow"));
380
166k
    }
381
382
166k
    let limit = remaining - len as usize;
383
316k
    while buf.remaining() > limit {
384
149k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
166k
    if buf.remaining() != limit {
388
6
        return Err(DecodeError::new("delimited length exceeded"));
389
166k
    }
390
166k
    Ok(())
391
166k
}
prost::encoding::merge_loop::<(&mut i32, &mut f64), prost::encoding::btree_map::merge_with_default<i32, f64, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::double::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
167k
pub fn merge_loop<T, M, B>(
367
167k
    value: &mut T,
368
167k
    buf: &mut B,
369
167k
    ctx: DecodeContext,
370
167k
    mut merge: M,
371
167k
) -> Result<(), DecodeError>
372
167k
where
373
167k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
167k
    B: Buf,
375
{
376
167k
    let len = decode_varint(buf)?;
377
167k
    let remaining = buf.remaining();
378
167k
    if len > remaining as u64 {
379
122
        return Err(DecodeError::new("buffer underflow"));
380
167k
    }
381
382
167k
    let limit = remaining - len as usize;
383
348k
    while buf.remaining() > limit {
384
181k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
167k
    if buf.remaining() != limit {
388
21
        return Err(DecodeError::new("delimited length exceeded"));
389
167k
    }
390
167k
    Ok(())
391
167k
}
prost::encoding::merge_loop::<(&mut i32, &mut f32), prost::encoding::btree_map::merge_with_default<i32, f32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::float::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
170k
pub fn merge_loop<T, M, B>(
367
170k
    value: &mut T,
368
170k
    buf: &mut B,
369
170k
    ctx: DecodeContext,
370
170k
    mut merge: M,
371
170k
) -> Result<(), DecodeError>
372
170k
where
373
170k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
170k
    B: Buf,
375
{
376
170k
    let len = decode_varint(buf)?;
377
170k
    let remaining = buf.remaining();
378
170k
    if len > remaining as u64 {
379
116
        return Err(DecodeError::new("buffer underflow"));
380
170k
    }
381
382
170k
    let limit = remaining - len as usize;
383
324k
    while buf.remaining() > limit {
384
153k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
170k
    if buf.remaining() != limit {
388
12
        return Err(DecodeError::new("delimited length exceeded"));
389
170k
    }
390
170k
    Ok(())
391
170k
}
prost::encoding::merge_loop::<(&mut u32, &mut u32), prost::encoding::btree_map::merge_with_default<u32, u32, &mut &[u8], prost::encoding::uint32::merge<&mut &[u8]>, prost::encoding::uint32::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
14.3k
pub fn merge_loop<T, M, B>(
367
14.3k
    value: &mut T,
368
14.3k
    buf: &mut B,
369
14.3k
    ctx: DecodeContext,
370
14.3k
    mut merge: M,
371
14.3k
) -> Result<(), DecodeError>
372
14.3k
where
373
14.3k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
14.3k
    B: Buf,
375
{
376
14.3k
    let len = decode_varint(buf)?;
377
14.3k
    let remaining = buf.remaining();
378
14.3k
    if len > remaining as u64 {
379
28
        return Err(DecodeError::new("buffer underflow"));
380
14.2k
    }
381
382
14.2k
    let limit = remaining - len as usize;
383
28.1k
    while buf.remaining() > limit {
384
13.9k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
14.2k
    if buf.remaining() != limit {
388
2
        return Err(DecodeError::new("delimited length exceeded"));
389
14.2k
    }
390
14.2k
    Ok(())
391
14.3k
}
prost::encoding::merge_loop::<(&mut u32, &mut u32), prost::encoding::btree_map::merge_with_default<u32, u32, &mut &[u8], prost::encoding::fixed32::merge<&mut &[u8]>, prost::encoding::fixed32::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
255k
pub fn merge_loop<T, M, B>(
367
255k
    value: &mut T,
368
255k
    buf: &mut B,
369
255k
    ctx: DecodeContext,
370
255k
    mut merge: M,
371
255k
) -> Result<(), DecodeError>
372
255k
where
373
255k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
255k
    B: Buf,
375
{
376
255k
    let len = decode_varint(buf)?;
377
255k
    let remaining = buf.remaining();
378
255k
    if len > remaining as u64 {
379
127
        return Err(DecodeError::new("buffer underflow"));
380
254k
    }
381
382
254k
    let limit = remaining - len as usize;
383
501k
    while buf.remaining() > limit {
384
247k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
254k
    if buf.remaining() != limit {
388
21
        return Err(DecodeError::new("delimited length exceeded"));
389
254k
    }
390
254k
    Ok(())
391
255k
}
prost::encoding::merge_loop::<(&mut i64, &mut i64), prost::encoding::btree_map::merge_with_default<i64, i64, &mut &[u8], prost::encoding::int64::merge<&mut &[u8]>, prost::encoding::int64::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
38.9k
pub fn merge_loop<T, M, B>(
367
38.9k
    value: &mut T,
368
38.9k
    buf: &mut B,
369
38.9k
    ctx: DecodeContext,
370
38.9k
    mut merge: M,
371
38.9k
) -> Result<(), DecodeError>
372
38.9k
where
373
38.9k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
38.9k
    B: Buf,
375
{
376
38.9k
    let len = decode_varint(buf)?;
377
38.9k
    let remaining = buf.remaining();
378
38.9k
    if len > remaining as u64 {
379
113
        return Err(DecodeError::new("buffer underflow"));
380
38.8k
    }
381
382
38.8k
    let limit = remaining - len as usize;
383
69.5k
    while buf.remaining() > limit {
384
30.7k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
38.7k
    if buf.remaining() != limit {
388
1
        return Err(DecodeError::new("delimited length exceeded"));
389
38.7k
    }
390
38.7k
    Ok(())
391
38.9k
}
prost::encoding::merge_loop::<(&mut i64, &mut i64), prost::encoding::btree_map::merge_with_default<i64, i64, &mut &[u8], prost::encoding::sint64::merge<&mut &[u8]>, prost::encoding::sint64::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
28.1k
pub fn merge_loop<T, M, B>(
367
28.1k
    value: &mut T,
368
28.1k
    buf: &mut B,
369
28.1k
    ctx: DecodeContext,
370
28.1k
    mut merge: M,
371
28.1k
) -> Result<(), DecodeError>
372
28.1k
where
373
28.1k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
28.1k
    B: Buf,
375
{
376
28.1k
    let len = decode_varint(buf)?;
377
28.1k
    let remaining = buf.remaining();
378
28.1k
    if len > remaining as u64 {
379
113
        return Err(DecodeError::new("buffer underflow"));
380
28.0k
    }
381
382
28.0k
    let limit = remaining - len as usize;
383
32.3k
    while buf.remaining() > limit {
384
4.40k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
27.9k
    if buf.remaining() != limit {
388
12
        return Err(DecodeError::new("delimited length exceeded"));
389
27.9k
    }
390
27.9k
    Ok(())
391
28.1k
}
prost::encoding::merge_loop::<(&mut i64, &mut i64), prost::encoding::btree_map::merge_with_default<i64, i64, &mut &[u8], prost::encoding::sfixed64::merge<&mut &[u8]>, prost::encoding::sfixed64::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
196k
pub fn merge_loop<T, M, B>(
367
196k
    value: &mut T,
368
196k
    buf: &mut B,
369
196k
    ctx: DecodeContext,
370
196k
    mut merge: M,
371
196k
) -> Result<(), DecodeError>
372
196k
where
373
196k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
196k
    B: Buf,
375
{
376
196k
    let len = decode_varint(buf)?;
377
196k
    let remaining = buf.remaining();
378
196k
    if len > remaining as u64 {
379
109
        return Err(DecodeError::new("buffer underflow"));
380
196k
    }
381
382
196k
    let limit = remaining - len as usize;
383
370k
    while buf.remaining() > limit {
384
174k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
196k
    if buf.remaining() != limit {
388
9
        return Err(DecodeError::new("delimited length exceeded"));
389
196k
    }
390
196k
    Ok(())
391
196k
}
prost::encoding::merge_loop::<(&mut u64, &mut u64), prost::encoding::btree_map::merge_with_default<u64, u64, &mut &[u8], prost::encoding::uint64::merge<&mut &[u8]>, prost::encoding::uint64::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
76.9k
pub fn merge_loop<T, M, B>(
367
76.9k
    value: &mut T,
368
76.9k
    buf: &mut B,
369
76.9k
    ctx: DecodeContext,
370
76.9k
    mut merge: M,
371
76.9k
) -> Result<(), DecodeError>
372
76.9k
where
373
76.9k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
76.9k
    B: Buf,
375
{
376
76.9k
    let len = decode_varint(buf)?;
377
76.9k
    let remaining = buf.remaining();
378
76.9k
    if len > remaining as u64 {
379
49
        return Err(DecodeError::new("buffer underflow"));
380
76.8k
    }
381
382
76.8k
    let limit = remaining - len as usize;
383
148k
    while buf.remaining() > limit {
384
71.3k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
76.8k
    if buf.remaining() != limit {
388
19
        return Err(DecodeError::new("delimited length exceeded"));
389
76.8k
    }
390
76.8k
    Ok(())
391
76.9k
}
prost::encoding::merge_loop::<(&mut u64, &mut u64), prost::encoding::btree_map::merge_with_default<u64, u64, &mut &[u8], prost::encoding::fixed64::merge<&mut &[u8]>, prost::encoding::fixed64::merge<&mut &[u8]>>::{closure#0}, &mut &[u8]>
Line
Count
Source
366
173k
pub fn merge_loop<T, M, B>(
367
173k
    value: &mut T,
368
173k
    buf: &mut B,
369
173k
    ctx: DecodeContext,
370
173k
    mut merge: M,
371
173k
) -> Result<(), DecodeError>
372
173k
where
373
173k
    M: FnMut(&mut T, &mut B, DecodeContext) -> Result<(), DecodeError>,
374
173k
    B: Buf,
375
{
376
173k
    let len = decode_varint(buf)?;
377
173k
    let remaining = buf.remaining();
378
173k
    if len > remaining as u64 {
379
112
        return Err(DecodeError::new("buffer underflow"));
380
173k
    }
381
382
173k
    let limit = remaining - len as usize;
383
333k
    while buf.remaining() > limit {
384
159k
        merge(value, buf, ctx.clone())?;
385
    }
386
387
173k
    if buf.remaining() != limit {
388
14
        return Err(DecodeError::new("delimited length exceeded"));
389
173k
    }
390
173k
    Ok(())
391
173k
}
392
393
1.33M
pub fn skip_field<B>(
394
1.33M
    wire_type: WireType,
395
1.33M
    tag: u32,
396
1.33M
    buf: &mut B,
397
1.33M
    ctx: DecodeContext,
398
1.33M
) -> Result<(), DecodeError>
399
1.33M
where
400
1.33M
    B: Buf,
401
{
402
1.33M
    ctx.limit_reached()?;
403
1.33M
    let len = match wire_type {
404
647k
        WireType::Varint => decode_varint(buf).map(|_| 0)?,
405
128k
        WireType::ThirtyTwoBit => 4,
406
106k
        WireType::SixtyFourBit => 8,
407
446k
        WireType::LengthDelimited => decode_varint(buf)?,
408
        WireType::StartGroup => loop {
409
4.38k
            let (inner_tag, inner_wire_type) = decode_key(buf)?;
410
3.62k
            match inner_wire_type {
411
                WireType::EndGroup => {
412
537
                    if inner_tag != tag {
413
139
                        return Err(DecodeError::new("unexpected end group tag"));
414
398
                    }
415
398
                    break 0;
416
                }
417
3.09k
                _ => skip_field(inner_wire_type, inner_tag, buf, ctx.enter_recursion())?,
418
            }
419
        },
420
326
        WireType::EndGroup => return Err(DecodeError::new("unexpected end group tag")),
421
    };
422
423
1.32M
    if len > buf.remaining() as u64 {
424
1.12k
        return Err(DecodeError::new("buffer underflow"));
425
1.32M
    }
426
427
1.32M
    buf.advance(len as usize);
428
1.32M
    Ok(())
429
1.33M
}
prost::encoding::skip_field::<&mut &[u8]>
Line
Count
Source
393
886k
pub fn skip_field<B>(
394
886k
    wire_type: WireType,
395
886k
    tag: u32,
396
886k
    buf: &mut B,
397
886k
    ctx: DecodeContext,
398
886k
) -> Result<(), DecodeError>
399
886k
where
400
886k
    B: Buf,
401
{
402
886k
    ctx.limit_reached()?;
403
886k
    let len = match wire_type {
404
418k
        WireType::Varint => decode_varint(buf).map(|_| 0)?,
405
64.6k
        WireType::ThirtyTwoBit => 4,
406
73.2k
        WireType::SixtyFourBit => 8,
407
328k
        WireType::LengthDelimited => decode_varint(buf)?,
408
        WireType::StartGroup => loop {
409
2.09k
            let (inner_tag, inner_wire_type) = decode_key(buf)?;
410
1.65k
            match inner_wire_type {
411
                WireType::EndGroup => {
412
263
                    if inner_tag != tag {
413
67
                        return Err(DecodeError::new("unexpected end group tag"));
414
196
                    }
415
196
                    break 0;
416
                }
417
1.38k
                _ => skip_field(inner_wire_type, inner_tag, buf, ctx.enter_recursion())?,
418
            }
419
        },
420
189
        WireType::EndGroup => return Err(DecodeError::new("unexpected end group tag")),
421
    };
422
423
884k
    if len > buf.remaining() as u64 {
424
602
        return Err(DecodeError::new("buffer underflow"));
425
884k
    }
426
427
884k
    buf.advance(len as usize);
428
884k
    Ok(())
429
886k
}
Unexecuted instantiation: prost::encoding::skip_field::<_>
prost::encoding::skip_field::<&mut &[u8]>
Line
Count
Source
393
445k
pub fn skip_field<B>(
394
445k
    wire_type: WireType,
395
445k
    tag: u32,
396
445k
    buf: &mut B,
397
445k
    ctx: DecodeContext,
398
445k
) -> Result<(), DecodeError>
399
445k
where
400
445k
    B: Buf,
401
{
402
445k
    ctx.limit_reached()?;
403
445k
    let len = match wire_type {
404
228k
        WireType::Varint => decode_varint(buf).map(|_| 0)?,
405
64.2k
        WireType::ThirtyTwoBit => 4,
406
33.5k
        WireType::SixtyFourBit => 8,
407
117k
        WireType::LengthDelimited => decode_varint(buf)?,
408
        WireType::StartGroup => loop {
409
2.28k
            let (inner_tag, inner_wire_type) = decode_key(buf)?;
410
1.97k
            match inner_wire_type {
411
                WireType::EndGroup => {
412
274
                    if inner_tag != tag {
413
72
                        return Err(DecodeError::new("unexpected end group tag"));
414
202
                    }
415
202
                    break 0;
416
                }
417
1.70k
                _ => skip_field(inner_wire_type, inner_tag, buf, ctx.enter_recursion())?,
418
            }
419
        },
420
137
        WireType::EndGroup => return Err(DecodeError::new("unexpected end group tag")),
421
    };
422
423
443k
    if len > buf.remaining() as u64 {
424
519
        return Err(DecodeError::new("buffer underflow"));
425
442k
    }
426
427
442k
    buf.advance(len as usize);
428
442k
    Ok(())
429
445k
}
430
431
/// Helper macro which emits an `encode_repeated` function for the type.
432
macro_rules! encode_repeated {
433
    ($ty:ty) => {
434
14.7M
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
14.7M
        where
436
14.7M
            B: BufMut,
437
        {
438
1.08G
            for value in values {
439
1.06G
                encode(tag, value, buf);
440
1.06G
            }
441
14.7M
        }
prost::encoding::sfixed64::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
401k
            for value in values {
439
8.10k
                encode(tag, value, buf);
440
8.10k
            }
441
393k
        }
prost::encoding::fixed64::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
399k
            for value in values {
439
5.99k
                encode(tag, value, buf);
440
5.99k
            }
441
393k
        }
prost::encoding::fixed32::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
1.13M
            for value in values {
439
738k
                encode(tag, value, buf);
440
738k
            }
441
393k
        }
prost::encoding::sfixed32::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
402k
            for value in values {
439
8.52k
                encode(tag, value, buf);
440
8.52k
            }
441
393k
        }
prost::encoding::bytes::encode_repeated::<alloc::vec::Vec<u8>, alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
575k
            for value in values {
439
182k
                encode(tag, value, buf);
440
182k
            }
441
393k
        }
prost::encoding::string::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
1.21M
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
1.21M
        where
436
1.21M
            B: BufMut,
437
        {
438
1.26M
            for value in values {
439
54.4k
                encode(tag, value, buf);
440
54.4k
            }
441
1.21M
        }
prost::encoding::uint64::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
1.88M
            for value in values {
439
1.49M
                encode(tag, value, buf);
440
1.49M
            }
441
393k
        }
prost::encoding::uint32::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
365M
            for value in values {
439
365M
                encode(tag, value, buf);
440
365M
            }
441
393k
        }
prost::encoding::sint32::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
46.9M
            for value in values {
439
46.5M
                encode(tag, value, buf);
440
46.5M
            }
441
393k
        }
prost::encoding::bool::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
462k
            for value in values {
439
69.1k
                encode(tag, value, buf);
440
69.1k
            }
441
393k
        }
prost::encoding::float::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
398k
            for value in values {
439
4.71k
                encode(tag, value, buf);
440
4.71k
            }
441
393k
        }
prost::encoding::sint64::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
93.5M
            for value in values {
439
93.1M
                encode(tag, value, buf);
440
93.1M
            }
441
393k
        }
prost::encoding::double::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
422k
            for value in values {
439
28.7k
                encode(tag, value, buf);
440
28.7k
            }
441
393k
        }
prost::encoding::int64::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
393k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
393k
        where
436
393k
            B: BufMut,
437
        {
438
6.28M
            for value in values {
439
5.89M
                encode(tag, value, buf);
440
5.89M
            }
441
393k
        }
prost::encoding::int32::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
787k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
787k
        where
436
787k
            B: BufMut,
437
        {
438
7.47M
            for value in values {
439
6.68M
                encode(tag, value, buf);
440
6.68M
            }
441
787k
        }
Unexecuted instantiation: prost::encoding::bool::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::bytes::encode_repeated::<_, _>
Unexecuted instantiation: prost::encoding::float::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::int32::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::int64::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::double::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::sint32::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::sint64::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::string::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::uint32::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::uint64::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::fixed32::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::fixed64::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::sfixed32::encode_repeated::<_>
Unexecuted instantiation: prost::encoding::sfixed64::encode_repeated::<_>
prost::encoding::float::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
463k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
463k
        where
436
463k
            B: BufMut,
437
        {
438
578k
            for value in values {
439
115k
                encode(tag, value, buf);
440
115k
            }
441
463k
        }
prost::encoding::sfixed32::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
463k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
463k
        where
436
463k
            B: BufMut,
437
        {
438
494k
            for value in values {
439
31.1k
                encode(tag, value, buf);
440
31.1k
            }
441
463k
        }
prost::encoding::int32::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
1.15M
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
1.15M
        where
436
1.15M
            B: BufMut,
437
        {
438
23.4M
            for value in values {
439
22.3M
                encode(tag, value, buf);
440
22.3M
            }
441
1.15M
        }
prost::encoding::sfixed64::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
463k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
463k
        where
436
463k
            B: BufMut,
437
        {
438
589k
            for value in values {
439
126k
                encode(tag, value, buf);
440
126k
            }
441
463k
        }
prost::encoding::string::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
694k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
694k
        where
436
694k
            B: BufMut,
437
        {
438
817k
            for value in values {
439
122k
                encode(tag, value, buf);
440
122k
            }
441
694k
        }
prost::encoding::bytes::encode_repeated::<alloc::vec::Vec<u8>, alloc::vec::Vec<u8>>
Line
Count
Source
434
231k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
231k
        where
436
231k
            B: BufMut,
437
        {
438
344k
            for value in values {
439
112k
                encode(tag, value, buf);
440
112k
            }
441
231k
        }
prost::encoding::fixed64::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
463k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
463k
        where
436
463k
            B: BufMut,
437
        {
438
502k
            for value in values {
439
39.2k
                encode(tag, value, buf);
440
39.2k
            }
441
463k
        }
prost::encoding::sint64::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
463k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
463k
        where
436
463k
            B: BufMut,
437
        {
438
33.2M
            for value in values {
439
32.7M
                encode(tag, value, buf);
440
32.7M
            }
441
463k
        }
prost::encoding::bool::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
463k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
463k
        where
436
463k
            B: BufMut,
437
        {
438
14.1M
            for value in values {
439
13.6M
                encode(tag, value, buf);
440
13.6M
            }
441
463k
        }
prost::encoding::double::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
463k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
463k
        where
436
463k
            B: BufMut,
437
        {
438
491k
            for value in values {
439
27.8k
                encode(tag, value, buf);
440
27.8k
            }
441
463k
        }
prost::encoding::uint32::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
463k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
463k
        where
436
463k
            B: BufMut,
437
        {
438
35.1M
            for value in values {
439
34.6M
                encode(tag, value, buf);
440
34.6M
            }
441
463k
        }
prost::encoding::fixed32::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
463k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
463k
        where
436
463k
            B: BufMut,
437
        {
438
495k
            for value in values {
439
31.8k
                encode(tag, value, buf);
440
31.8k
            }
441
463k
        }
prost::encoding::uint64::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
463k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
463k
        where
436
463k
            B: BufMut,
437
        {
438
31.6M
            for value in values {
439
31.1M
                encode(tag, value, buf);
440
31.1M
            }
441
463k
        }
prost::encoding::int64::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
463k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
463k
        where
436
463k
            B: BufMut,
437
        {
438
89.3M
            for value in values {
439
88.8M
                encode(tag, value, buf);
440
88.8M
            }
441
463k
        }
prost::encoding::sint32::encode_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
434
463k
        pub fn encode_repeated<B>(tag: u32, values: &[$ty], buf: &mut B)
435
463k
        where
436
463k
            B: BufMut,
437
        {
438
321M
            for value in values {
439
321M
                encode(tag, value, buf);
440
321M
            }
441
463k
        }
442
    };
443
}
444
445
/// Helper macro which emits a `merge_repeated` function for the numeric type.
446
macro_rules! merge_repeated_numeric {
447
    ($ty:ty,
448
     $wire_type:expr,
449
     $merge:ident,
450
     $merge_repeated:ident) => {
451
533M
        pub fn $merge_repeated<B>(
452
533M
            wire_type: WireType,
453
533M
            values: &mut Vec<$ty>,
454
533M
            buf: &mut B,
455
533M
            ctx: DecodeContext,
456
533M
        ) -> Result<(), DecodeError>
457
533M
        where
458
533M
            B: Buf,
459
        {
460
533M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
544M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
544M
                    let mut value = Default::default();
464
544M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
544M
                    values.push(value);
466
544M
                    Ok(())
467
544M
                })
prost::encoding::sfixed64::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
111k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
111k
                    let mut value = Default::default();
464
111k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
111k
                    values.push(value);
466
111k
                    Ok(())
467
111k
                })
prost::encoding::fixed64::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
35.4k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
35.4k
                    let mut value = Default::default();
464
35.4k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
35.4k
                    values.push(value);
466
35.4k
                    Ok(())
467
35.4k
                })
prost::encoding::fixed32::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
443k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
443k
                    let mut value = Default::default();
464
443k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
443k
                    values.push(value);
466
443k
                    Ok(())
467
443k
                })
prost::encoding::sfixed32::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
37.5k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
37.5k
                    let mut value = Default::default();
464
37.5k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
37.5k
                    values.push(value);
466
37.5k
                    Ok(())
467
37.5k
                })
prost::encoding::uint64::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
1.86M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
1.86M
                    let mut value = Default::default();
464
1.86M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
1.86M
                    values.push(value);
466
1.86M
                    Ok(())
467
1.86M
                })
prost::encoding::uint32::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
182M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
182M
                    let mut value = Default::default();
464
182M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
182M
                    values.push(value);
466
182M
                    Ok(())
467
182M
                })
prost::encoding::sint32::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
23.5M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
23.5M
                    let mut value = Default::default();
464
23.5M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
23.5M
                    values.push(value);
466
23.5M
                    Ok(())
467
23.5M
                })
prost::encoding::bool::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
84.8k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
84.8k
                    let mut value = Default::default();
464
84.8k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
84.8k
                    values.push(value);
466
84.8k
                    Ok(())
467
84.8k
                })
prost::encoding::float::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
888k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
888k
                    let mut value = Default::default();
464
888k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
888k
                    values.push(value);
466
888k
                    Ok(())
467
888k
                })
prost::encoding::sint64::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
48.7M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
48.7M
                    let mut value = Default::default();
464
48.7M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
48.7M
                    values.push(value);
466
48.7M
                    Ok(())
467
48.7M
                })
prost::encoding::double::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
162k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
162k
                    let mut value = Default::default();
464
162k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
162k
                    values.push(value);
466
162k
                    Ok(())
467
162k
                })
prost::encoding::int64::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
3.66M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
3.66M
                    let mut value = Default::default();
464
3.66M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
3.66M
                    values.push(value);
466
3.66M
                    Ok(())
467
3.66M
                })
prost::encoding::int32::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
3.67M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
3.67M
                    let mut value = Default::default();
464
3.67M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
3.67M
                    values.push(value);
466
3.67M
                    Ok(())
467
3.67M
                })
Unexecuted instantiation: prost::encoding::bool::merge_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::float::merge_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::int32::merge_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::int64::merge_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::double::merge_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::sint32::merge_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::sint64::merge_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::uint32::merge_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::uint64::merge_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::fixed32::merge_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::fixed64::merge_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::sfixed32::merge_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::sfixed64::merge_repeated::<_>::{closure#0}
prost::encoding::float::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
264k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
264k
                    let mut value = Default::default();
464
264k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
264k
                    values.push(value);
466
264k
                    Ok(())
467
264k
                })
prost::encoding::sfixed32::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
327k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
327k
                    let mut value = Default::default();
464
327k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
327k
                    values.push(value);
466
327k
                    Ok(())
467
327k
                })
prost::encoding::int32::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
12.3M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
12.3M
                    let mut value = Default::default();
464
12.3M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
12.3M
                    values.push(value);
466
12.3M
                    Ok(())
467
12.3M
                })
prost::encoding::sfixed64::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
150k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
150k
                    let mut value = Default::default();
464
150k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
150k
                    values.push(value);
466
150k
                    Ok(())
467
150k
                })
prost::encoding::fixed64::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
47.0k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
47.0k
                    let mut value = Default::default();
464
47.0k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
47.0k
                    values.push(value);
466
47.0k
                    Ok(())
467
47.0k
                })
prost::encoding::sint64::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
17.0M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
17.0M
                    let mut value = Default::default();
464
17.0M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
17.0M
                    values.push(value);
466
17.0M
                    Ok(())
467
17.0M
                })
prost::encoding::bool::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
7.13M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
7.13M
                    let mut value = Default::default();
464
7.13M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
7.13M
                    values.push(value);
466
7.13M
                    Ok(())
467
7.13M
                })
prost::encoding::double::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
115k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
115k
                    let mut value = Default::default();
464
115k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
115k
                    values.push(value);
466
115k
                    Ok(())
467
115k
                })
prost::encoding::uint32::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
17.9M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
17.9M
                    let mut value = Default::default();
464
17.9M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
17.9M
                    values.push(value);
466
17.9M
                    Ok(())
467
17.9M
                })
prost::encoding::fixed32::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
27.7k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
27.7k
                    let mut value = Default::default();
464
27.7k
                    $merge($wire_type, &mut value, buf, ctx)?;
465
27.7k
                    values.push(value);
466
27.7k
                    Ok(())
467
27.7k
                })
prost::encoding::uint64::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
15.8M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
15.8M
                    let mut value = Default::default();
464
15.8M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
15.8M
                    values.push(value);
466
15.8M
                    Ok(())
467
15.8M
                })
prost::encoding::int64::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
44.9M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
44.9M
                    let mut value = Default::default();
464
44.9M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
44.9M
                    values.push(value);
466
44.9M
                    Ok(())
467
44.9M
                })
prost::encoding::sint32::merge_repeated::<&mut &[u8]>::{closure#0}
Line
Count
Source
462
162M
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
162M
                    let mut value = Default::default();
464
162M
                    $merge($wire_type, &mut value, buf, ctx)?;
465
162M
                    values.push(value);
466
162M
                    Ok(())
467
162M
                })
468
            } else {
469
                // Unpacked.
470
532M
                check_wire_type($wire_type, wire_type)?;
471
532M
                let mut value = Default::default();
472
532M
                $merge(wire_type, &mut value, buf, ctx)?;
473
532M
                values.push(value);
474
532M
                Ok(())
475
            }
476
533M
        }
prost::encoding::sfixed64::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
26.2k
        pub fn $merge_repeated<B>(
452
26.2k
            wire_type: WireType,
453
26.2k
            values: &mut Vec<$ty>,
454
26.2k
            buf: &mut B,
455
26.2k
            ctx: DecodeContext,
456
26.2k
        ) -> Result<(), DecodeError>
457
26.2k
        where
458
26.2k
            B: Buf,
459
        {
460
26.2k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
19.5k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
6.71k
                check_wire_type($wire_type, wire_type)?;
471
6.70k
                let mut value = Default::default();
472
6.70k
                $merge(wire_type, &mut value, buf, ctx)?;
473
6.70k
                values.push(value);
474
6.70k
                Ok(())
475
            }
476
26.2k
        }
prost::encoding::fixed64::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
48.6k
        pub fn $merge_repeated<B>(
452
48.6k
            wire_type: WireType,
453
48.6k
            values: &mut Vec<$ty>,
454
48.6k
            buf: &mut B,
455
48.6k
            ctx: DecodeContext,
456
48.6k
        ) -> Result<(), DecodeError>
457
48.6k
        where
458
48.6k
            B: Buf,
459
        {
460
48.6k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
9.03k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
39.6k
                check_wire_type($wire_type, wire_type)?;
471
39.6k
                let mut value = Default::default();
472
39.6k
                $merge(wire_type, &mut value, buf, ctx)?;
473
39.6k
                values.push(value);
474
39.6k
                Ok(())
475
            }
476
48.6k
        }
prost::encoding::fixed32::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
375k
        pub fn $merge_repeated<B>(
452
375k
            wire_type: WireType,
453
375k
            values: &mut Vec<$ty>,
454
375k
            buf: &mut B,
455
375k
            ctx: DecodeContext,
456
375k
        ) -> Result<(), DecodeError>
457
375k
        where
458
375k
            B: Buf,
459
        {
460
375k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
2.59k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
373k
                check_wire_type($wire_type, wire_type)?;
471
373k
                let mut value = Default::default();
472
373k
                $merge(wire_type, &mut value, buf, ctx)?;
473
373k
                values.push(value);
474
373k
                Ok(())
475
            }
476
375k
        }
prost::encoding::sfixed32::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
26.4k
        pub fn $merge_repeated<B>(
452
26.4k
            wire_type: WireType,
453
26.4k
            values: &mut Vec<$ty>,
454
26.4k
            buf: &mut B,
455
26.4k
            ctx: DecodeContext,
456
26.4k
        ) -> Result<(), DecodeError>
457
26.4k
        where
458
26.4k
            B: Buf,
459
        {
460
26.4k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
4.23k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
22.1k
                check_wire_type($wire_type, wire_type)?;
471
22.1k
                let mut value = Default::default();
472
22.1k
                $merge(wire_type, &mut value, buf, ctx)?;
473
22.1k
                values.push(value);
474
22.1k
                Ok(())
475
            }
476
26.4k
        }
prost::encoding::uint64::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
789k
        pub fn $merge_repeated<B>(
452
789k
            wire_type: WireType,
453
789k
            values: &mut Vec<$ty>,
454
789k
            buf: &mut B,
455
789k
            ctx: DecodeContext,
456
789k
        ) -> Result<(), DecodeError>
457
789k
        where
458
789k
            B: Buf,
459
        {
460
789k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
27.0k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
762k
                check_wire_type($wire_type, wire_type)?;
471
762k
                let mut value = Default::default();
472
762k
                $merge(wire_type, &mut value, buf, ctx)?;
473
762k
                values.push(value);
474
762k
                Ok(())
475
            }
476
789k
        }
prost::encoding::uint32::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
182M
        pub fn $merge_repeated<B>(
452
182M
            wire_type: WireType,
453
182M
            values: &mut Vec<$ty>,
454
182M
            buf: &mut B,
455
182M
            ctx: DecodeContext,
456
182M
        ) -> Result<(), DecodeError>
457
182M
        where
458
182M
            B: Buf,
459
        {
460
182M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
33.9k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
182M
                check_wire_type($wire_type, wire_type)?;
471
182M
                let mut value = Default::default();
472
182M
                $merge(wire_type, &mut value, buf, ctx)?;
473
182M
                values.push(value);
474
182M
                Ok(())
475
            }
476
182M
        }
prost::encoding::sint32::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
23.3M
        pub fn $merge_repeated<B>(
452
23.3M
            wire_type: WireType,
453
23.3M
            values: &mut Vec<$ty>,
454
23.3M
            buf: &mut B,
455
23.3M
            ctx: DecodeContext,
456
23.3M
        ) -> Result<(), DecodeError>
457
23.3M
        where
458
23.3M
            B: Buf,
459
        {
460
23.3M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
21.8k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
23.2M
                check_wire_type($wire_type, wire_type)?;
471
23.2M
                let mut value = Default::default();
472
23.2M
                $merge(wire_type, &mut value, buf, ctx)?;
473
23.2M
                values.push(value);
474
23.2M
                Ok(())
475
            }
476
23.3M
        }
prost::encoding::bool::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
49.6k
        pub fn $merge_repeated<B>(
452
49.6k
            wire_type: WireType,
453
49.6k
            values: &mut Vec<$ty>,
454
49.6k
            buf: &mut B,
455
49.6k
            ctx: DecodeContext,
456
49.6k
        ) -> Result<(), DecodeError>
457
49.6k
        where
458
49.6k
            B: Buf,
459
        {
460
49.6k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
7.21k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
42.4k
                check_wire_type($wire_type, wire_type)?;
471
42.4k
                let mut value = Default::default();
472
42.4k
                $merge(wire_type, &mut value, buf, ctx)?;
473
42.4k
                values.push(value);
474
42.4k
                Ok(())
475
            }
476
49.6k
        }
prost::encoding::float::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
24.1k
        pub fn $merge_repeated<B>(
452
24.1k
            wire_type: WireType,
453
24.1k
            values: &mut Vec<$ty>,
454
24.1k
            buf: &mut B,
455
24.1k
            ctx: DecodeContext,
456
24.1k
        ) -> Result<(), DecodeError>
457
24.1k
        where
458
24.1k
            B: Buf,
459
        {
460
24.1k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
19.6k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
4.44k
                check_wire_type($wire_type, wire_type)?;
471
4.43k
                let mut value = Default::default();
472
4.43k
                $merge(wire_type, &mut value, buf, ctx)?;
473
4.43k
                values.push(value);
474
4.43k
                Ok(())
475
            }
476
24.1k
        }
prost::encoding::sint64::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
46.5M
        pub fn $merge_repeated<B>(
452
46.5M
            wire_type: WireType,
453
46.5M
            values: &mut Vec<$ty>,
454
46.5M
            buf: &mut B,
455
46.5M
            ctx: DecodeContext,
456
46.5M
        ) -> Result<(), DecodeError>
457
46.5M
        where
458
46.5M
            B: Buf,
459
        {
460
46.5M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
16.5k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
46.5M
                check_wire_type($wire_type, wire_type)?;
471
46.5M
                let mut value = Default::default();
472
46.5M
                $merge(wire_type, &mut value, buf, ctx)?;
473
46.5M
                values.push(value);
474
46.5M
                Ok(())
475
            }
476
46.5M
        }
prost::encoding::double::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
31.0k
        pub fn $merge_repeated<B>(
452
31.0k
            wire_type: WireType,
453
31.0k
            values: &mut Vec<$ty>,
454
31.0k
            buf: &mut B,
455
31.0k
            ctx: DecodeContext,
456
31.0k
        ) -> Result<(), DecodeError>
457
31.0k
        where
458
31.0k
            B: Buf,
459
        {
460
31.0k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
12.0k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
18.9k
                check_wire_type($wire_type, wire_type)?;
471
18.9k
                let mut value = Default::default();
472
18.9k
                $merge(wire_type, &mut value, buf, ctx)?;
473
18.9k
                values.push(value);
474
18.9k
                Ok(())
475
            }
476
31.0k
        }
prost::encoding::int64::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
2.97M
        pub fn $merge_repeated<B>(
452
2.97M
            wire_type: WireType,
453
2.97M
            values: &mut Vec<$ty>,
454
2.97M
            buf: &mut B,
455
2.97M
            ctx: DecodeContext,
456
2.97M
        ) -> Result<(), DecodeError>
457
2.97M
        where
458
2.97M
            B: Buf,
459
        {
460
2.97M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
19.0k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
2.95M
                check_wire_type($wire_type, wire_type)?;
471
2.95M
                let mut value = Default::default();
472
2.95M
                $merge(wire_type, &mut value, buf, ctx)?;
473
2.95M
                values.push(value);
474
2.95M
                Ok(())
475
            }
476
2.97M
        }
prost::encoding::int32::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
3.41M
        pub fn $merge_repeated<B>(
452
3.41M
            wire_type: WireType,
453
3.41M
            values: &mut Vec<$ty>,
454
3.41M
            buf: &mut B,
455
3.41M
            ctx: DecodeContext,
456
3.41M
        ) -> Result<(), DecodeError>
457
3.41M
        where
458
3.41M
            B: Buf,
459
        {
460
3.41M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
49.3k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
3.36M
                check_wire_type($wire_type, wire_type)?;
471
3.36M
                let mut value = Default::default();
472
3.36M
                $merge(wire_type, &mut value, buf, ctx)?;
473
3.36M
                values.push(value);
474
3.36M
                Ok(())
475
            }
476
3.41M
        }
Unexecuted instantiation: prost::encoding::bool::merge_repeated::<_>
Unexecuted instantiation: prost::encoding::float::merge_repeated::<_>
Unexecuted instantiation: prost::encoding::int32::merge_repeated::<_>
Unexecuted instantiation: prost::encoding::int64::merge_repeated::<_>
Unexecuted instantiation: prost::encoding::double::merge_repeated::<_>
Unexecuted instantiation: prost::encoding::sint32::merge_repeated::<_>
Unexecuted instantiation: prost::encoding::sint64::merge_repeated::<_>
Unexecuted instantiation: prost::encoding::uint32::merge_repeated::<_>
Unexecuted instantiation: prost::encoding::uint64::merge_repeated::<_>
Unexecuted instantiation: prost::encoding::fixed32::merge_repeated::<_>
Unexecuted instantiation: prost::encoding::fixed64::merge_repeated::<_>
Unexecuted instantiation: prost::encoding::sfixed32::merge_repeated::<_>
Unexecuted instantiation: prost::encoding::sfixed64::merge_repeated::<_>
prost::encoding::float::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
79.2k
        pub fn $merge_repeated<B>(
452
79.2k
            wire_type: WireType,
453
79.2k
            values: &mut Vec<$ty>,
454
79.2k
            buf: &mut B,
455
79.2k
            ctx: DecodeContext,
456
79.2k
        ) -> Result<(), DecodeError>
457
79.2k
        where
458
79.2k
            B: Buf,
459
        {
460
79.2k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
18.1k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
61.1k
                check_wire_type($wire_type, wire_type)?;
471
61.1k
                let mut value = Default::default();
472
61.1k
                $merge(wire_type, &mut value, buf, ctx)?;
473
61.1k
                values.push(value);
474
61.1k
                Ok(())
475
            }
476
79.2k
        }
prost::encoding::sfixed32::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
30.8k
        pub fn $merge_repeated<B>(
452
30.8k
            wire_type: WireType,
453
30.8k
            values: &mut Vec<$ty>,
454
30.8k
            buf: &mut B,
455
30.8k
            ctx: DecodeContext,
456
30.8k
        ) -> Result<(), DecodeError>
457
30.8k
        where
458
30.8k
            B: Buf,
459
        {
460
30.8k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
8.33k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
22.4k
                check_wire_type($wire_type, wire_type)?;
471
22.4k
                let mut value = Default::default();
472
22.4k
                $merge(wire_type, &mut value, buf, ctx)?;
473
22.4k
                values.push(value);
474
22.4k
                Ok(())
475
            }
476
30.8k
        }
prost::encoding::int32::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
11.1M
        pub fn $merge_repeated<B>(
452
11.1M
            wire_type: WireType,
453
11.1M
            values: &mut Vec<$ty>,
454
11.1M
            buf: &mut B,
455
11.1M
            ctx: DecodeContext,
456
11.1M
        ) -> Result<(), DecodeError>
457
11.1M
        where
458
11.1M
            B: Buf,
459
        {
460
11.1M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
21.0k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
11.1M
                check_wire_type($wire_type, wire_type)?;
471
11.1M
                let mut value = Default::default();
472
11.1M
                $merge(wire_type, &mut value, buf, ctx)?;
473
11.1M
                values.push(value);
474
11.1M
                Ok(())
475
            }
476
11.1M
        }
prost::encoding::sfixed64::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
91.3k
        pub fn $merge_repeated<B>(
452
91.3k
            wire_type: WireType,
453
91.3k
            values: &mut Vec<$ty>,
454
91.3k
            buf: &mut B,
455
91.3k
            ctx: DecodeContext,
456
91.3k
        ) -> Result<(), DecodeError>
457
91.3k
        where
458
91.3k
            B: Buf,
459
        {
460
91.3k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
23.3k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
68.0k
                check_wire_type($wire_type, wire_type)?;
471
68.0k
                let mut value = Default::default();
472
68.0k
                $merge(wire_type, &mut value, buf, ctx)?;
473
68.0k
                values.push(value);
474
68.0k
                Ok(())
475
            }
476
91.3k
        }
prost::encoding::fixed64::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
27.8k
        pub fn $merge_repeated<B>(
452
27.8k
            wire_type: WireType,
453
27.8k
            values: &mut Vec<$ty>,
454
27.8k
            buf: &mut B,
455
27.8k
            ctx: DecodeContext,
456
27.8k
        ) -> Result<(), DecodeError>
457
27.8k
        where
458
27.8k
            B: Buf,
459
        {
460
27.8k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
7.09k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
20.7k
                check_wire_type($wire_type, wire_type)?;
471
20.7k
                let mut value = Default::default();
472
20.7k
                $merge(wire_type, &mut value, buf, ctx)?;
473
20.7k
                values.push(value);
474
20.7k
                Ok(())
475
            }
476
27.8k
        }
prost::encoding::sint64::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
16.4M
        pub fn $merge_repeated<B>(
452
16.4M
            wire_type: WireType,
453
16.4M
            values: &mut Vec<$ty>,
454
16.4M
            buf: &mut B,
455
16.4M
            ctx: DecodeContext,
456
16.4M
        ) -> Result<(), DecodeError>
457
16.4M
        where
458
16.4M
            B: Buf,
459
        {
460
16.4M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
16.0k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
16.3M
                check_wire_type($wire_type, wire_type)?;
471
16.3M
                let mut value = Default::default();
472
16.3M
                $merge(wire_type, &mut value, buf, ctx)?;
473
16.3M
                values.push(value);
474
16.3M
                Ok(())
475
            }
476
16.4M
        }
prost::encoding::bool::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
6.85M
        pub fn $merge_repeated<B>(
452
6.85M
            wire_type: WireType,
453
6.85M
            values: &mut Vec<$ty>,
454
6.85M
            buf: &mut B,
455
6.85M
            ctx: DecodeContext,
456
6.85M
        ) -> Result<(), DecodeError>
457
6.85M
        where
458
6.85M
            B: Buf,
459
        {
460
6.85M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
6.42k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
6.84M
                check_wire_type($wire_type, wire_type)?;
471
6.84M
                let mut value = Default::default();
472
6.84M
                $merge(wire_type, &mut value, buf, ctx)?;
473
6.84M
                values.push(value);
474
6.84M
                Ok(())
475
            }
476
6.85M
        }
prost::encoding::double::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
56.9k
        pub fn $merge_repeated<B>(
452
56.9k
            wire_type: WireType,
453
56.9k
            values: &mut Vec<$ty>,
454
56.9k
            buf: &mut B,
455
56.9k
            ctx: DecodeContext,
456
56.9k
        ) -> Result<(), DecodeError>
457
56.9k
        where
458
56.9k
            B: Buf,
459
        {
460
56.9k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
20.8k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
36.0k
                check_wire_type($wire_type, wire_type)?;
471
36.0k
                let mut value = Default::default();
472
36.0k
                $merge(wire_type, &mut value, buf, ctx)?;
473
36.0k
                values.push(value);
474
36.0k
                Ok(())
475
            }
476
56.9k
        }
prost::encoding::uint32::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
17.3M
        pub fn $merge_repeated<B>(
452
17.3M
            wire_type: WireType,
453
17.3M
            values: &mut Vec<$ty>,
454
17.3M
            buf: &mut B,
455
17.3M
            ctx: DecodeContext,
456
17.3M
        ) -> Result<(), DecodeError>
457
17.3M
        where
458
17.3M
            B: Buf,
459
        {
460
17.3M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
8.40k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
17.3M
                check_wire_type($wire_type, wire_type)?;
471
17.3M
                let mut value = Default::default();
472
17.3M
                $merge(wire_type, &mut value, buf, ctx)?;
473
17.3M
                values.push(value);
474
17.3M
                Ok(())
475
            }
476
17.3M
        }
prost::encoding::fixed32::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
26.1k
        pub fn $merge_repeated<B>(
452
26.1k
            wire_type: WireType,
453
26.1k
            values: &mut Vec<$ty>,
454
26.1k
            buf: &mut B,
455
26.1k
            ctx: DecodeContext,
456
26.1k
        ) -> Result<(), DecodeError>
457
26.1k
        where
458
26.1k
            B: Buf,
459
        {
460
26.1k
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
4.80k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
21.3k
                check_wire_type($wire_type, wire_type)?;
471
21.3k
                let mut value = Default::default();
472
21.3k
                $merge(wire_type, &mut value, buf, ctx)?;
473
21.3k
                values.push(value);
474
21.3k
                Ok(())
475
            }
476
26.1k
        }
prost::encoding::uint64::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
15.5M
        pub fn $merge_repeated<B>(
452
15.5M
            wire_type: WireType,
453
15.5M
            values: &mut Vec<$ty>,
454
15.5M
            buf: &mut B,
455
15.5M
            ctx: DecodeContext,
456
15.5M
        ) -> Result<(), DecodeError>
457
15.5M
        where
458
15.5M
            B: Buf,
459
        {
460
15.5M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
18.8k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
15.5M
                check_wire_type($wire_type, wire_type)?;
471
15.5M
                let mut value = Default::default();
472
15.5M
                $merge(wire_type, &mut value, buf, ctx)?;
473
15.5M
                values.push(value);
474
15.5M
                Ok(())
475
            }
476
15.5M
        }
prost::encoding::int64::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
44.4M
        pub fn $merge_repeated<B>(
452
44.4M
            wire_type: WireType,
453
44.4M
            values: &mut Vec<$ty>,
454
44.4M
            buf: &mut B,
455
44.4M
            ctx: DecodeContext,
456
44.4M
        ) -> Result<(), DecodeError>
457
44.4M
        where
458
44.4M
            B: Buf,
459
        {
460
44.4M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
12.8k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
44.4M
                check_wire_type($wire_type, wire_type)?;
471
44.4M
                let mut value = Default::default();
472
44.4M
                $merge(wire_type, &mut value, buf, ctx)?;
473
44.4M
                values.push(value);
474
44.4M
                Ok(())
475
            }
476
44.4M
        }
prost::encoding::sint32::merge_repeated::<&mut &[u8]>
Line
Count
Source
451
160M
        pub fn $merge_repeated<B>(
452
160M
            wire_type: WireType,
453
160M
            values: &mut Vec<$ty>,
454
160M
            buf: &mut B,
455
160M
            ctx: DecodeContext,
456
160M
        ) -> Result<(), DecodeError>
457
160M
        where
458
160M
            B: Buf,
459
        {
460
160M
            if wire_type == WireType::LengthDelimited {
461
                // Packed.
462
7.19k
                merge_loop(values, buf, ctx, |values, buf, ctx| {
463
                    let mut value = Default::default();
464
                    $merge($wire_type, &mut value, buf, ctx)?;
465
                    values.push(value);
466
                    Ok(())
467
                })
468
            } else {
469
                // Unpacked.
470
160M
                check_wire_type($wire_type, wire_type)?;
471
160M
                let mut value = Default::default();
472
160M
                $merge(wire_type, &mut value, buf, ctx)?;
473
160M
                values.push(value);
474
160M
                Ok(())
475
            }
476
160M
        }
477
    };
478
}
479
480
/// Macro which emits a module containing a set of encoding functions for a
481
/// variable width numeric type.
482
macro_rules! varint {
483
    ($ty:ty,
484
     $proto_ty:ident) => (
485
        varint!($ty,
486
                $proto_ty,
487
                to_uint64(value) { *value as u64 },
488
                from_uint64(value) { value as $ty });
489
    );
490
491
    ($ty:ty,
492
     $proto_ty:ident,
493
     to_uint64($to_uint64_value:ident) $to_uint64:expr,
494
     from_uint64($from_uint64_value:ident) $from_uint64:expr) => (
495
496
         pub mod $proto_ty {
497
            use crate::encoding::*;
498
499
1.06G
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
1.06G
                encode_key(tag, WireType::Varint, buf);
501
1.06G
                encode_varint($to_uint64, buf);
502
1.06G
            }
prost::encoding::uint64::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
1.53M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
1.53M
                encode_key(tag, WireType::Varint, buf);
501
1.53M
                encode_varint($to_uint64, buf);
502
1.53M
            }
prost::encoding::uint32::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
365M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
365M
                encode_key(tag, WireType::Varint, buf);
501
365M
                encode_varint($to_uint64, buf);
502
365M
            }
prost::encoding::sint32::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
46.6M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
46.6M
                encode_key(tag, WireType::Varint, buf);
501
46.6M
                encode_varint($to_uint64, buf);
502
46.6M
            }
prost::encoding::bool::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
110k
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
110k
                encode_key(tag, WireType::Varint, buf);
501
110k
                encode_varint($to_uint64, buf);
502
110k
            }
prost::encoding::sint64::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
93.1M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
93.1M
                encode_key(tag, WireType::Varint, buf);
501
93.1M
                encode_varint($to_uint64, buf);
502
93.1M
            }
prost::encoding::int64::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
5.97M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
5.97M
                encode_key(tag, WireType::Varint, buf);
501
5.97M
                encode_varint($to_uint64, buf);
502
5.97M
            }
prost::encoding::int32::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
6.89M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
6.89M
                encode_key(tag, WireType::Varint, buf);
501
6.89M
                encode_varint($to_uint64, buf);
502
6.89M
            }
Unexecuted instantiation: prost::encoding::bool::encode::<_>
Unexecuted instantiation: prost::encoding::int32::encode::<_>
Unexecuted instantiation: prost::encoding::int64::encode::<_>
Unexecuted instantiation: prost::encoding::sint32::encode::<_>
Unexecuted instantiation: prost::encoding::sint64::encode::<_>
Unexecuted instantiation: prost::encoding::uint32::encode::<_>
Unexecuted instantiation: prost::encoding::uint64::encode::<_>
prost::encoding::int32::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
22.4M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
22.4M
                encode_key(tag, WireType::Varint, buf);
501
22.4M
                encode_varint($to_uint64, buf);
502
22.4M
            }
prost::encoding::sint64::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
32.7M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
32.7M
                encode_key(tag, WireType::Varint, buf);
501
32.7M
                encode_varint($to_uint64, buf);
502
32.7M
            }
prost::encoding::bool::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
13.7M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
13.7M
                encode_key(tag, WireType::Varint, buf);
501
13.7M
                encode_varint($to_uint64, buf);
502
13.7M
            }
prost::encoding::uint32::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
34.7M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
34.7M
                encode_key(tag, WireType::Varint, buf);
501
34.7M
                encode_varint($to_uint64, buf);
502
34.7M
            }
prost::encoding::uint64::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
31.1M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
31.1M
                encode_key(tag, WireType::Varint, buf);
501
31.1M
                encode_varint($to_uint64, buf);
502
31.1M
            }
prost::encoding::int64::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
88.8M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
88.8M
                encode_key(tag, WireType::Varint, buf);
501
88.8M
                encode_varint($to_uint64, buf);
502
88.8M
            }
prost::encoding::sint32::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
499
321M
            pub fn encode<B>(tag: u32, $to_uint64_value: &$ty, buf: &mut B) where B: BufMut {
500
321M
                encode_key(tag, WireType::Varint, buf);
501
321M
                encode_varint($to_uint64, buf);
502
321M
            }
503
504
1.07G
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
1.07G
                check_wire_type(WireType::Varint, wire_type)?;
506
1.07G
                let $from_uint64_value = decode_varint(buf)?;
507
1.07G
                *value = $from_uint64;
508
1.07G
                Ok(())
509
1.07G
            }
prost::encoding::uint64::merge::<&mut &[u8]>
Line
Count
Source
504
2.98M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
2.98M
                check_wire_type(WireType::Varint, wire_type)?;
506
2.98M
                let $from_uint64_value = decode_varint(buf)?;
507
2.98M
                *value = $from_uint64;
508
2.98M
                Ok(())
509
2.98M
            }
prost::encoding::uint32::merge::<&mut &[u8]>
Line
Count
Source
504
365M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
365M
                check_wire_type(WireType::Varint, wire_type)?;
506
365M
                let $from_uint64_value = decode_varint(buf)?;
507
365M
                *value = $from_uint64;
508
365M
                Ok(())
509
365M
            }
prost::encoding::sint32::merge::<&mut &[u8]>
Line
Count
Source
504
47.4M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
47.4M
                check_wire_type(WireType::Varint, wire_type)?;
506
47.4M
                let $from_uint64_value = decode_varint(buf)?;
507
47.4M
                *value = $from_uint64;
508
47.4M
                Ok(())
509
47.4M
            }
prost::encoding::bool::merge::<&mut &[u8]>
Line
Count
Source
504
779k
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
779k
                check_wire_type(WireType::Varint, wire_type)?;
506
779k
                let $from_uint64_value = decode_varint(buf)?;
507
779k
                *value = $from_uint64;
508
779k
                Ok(())
509
779k
            }
prost::encoding::sint64::merge::<&mut &[u8]>
Line
Count
Source
504
95.4M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
95.4M
                check_wire_type(WireType::Varint, wire_type)?;
506
95.4M
                let $from_uint64_value = decode_varint(buf)?;
507
95.4M
                *value = $from_uint64;
508
95.4M
                Ok(())
509
95.4M
            }
prost::encoding::int64::merge::<&mut &[u8]>
Line
Count
Source
504
6.97M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
6.97M
                check_wire_type(WireType::Varint, wire_type)?;
506
6.97M
                let $from_uint64_value = decode_varint(buf)?;
507
6.97M
                *value = $from_uint64;
508
6.97M
                Ok(())
509
6.97M
            }
prost::encoding::int32::merge::<&mut &[u8]>
Line
Count
Source
504
8.86M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
8.86M
                check_wire_type(WireType::Varint, wire_type)?;
506
8.86M
                let $from_uint64_value = decode_varint(buf)?;
507
8.86M
                *value = $from_uint64;
508
8.86M
                Ok(())
509
8.86M
            }
Unexecuted instantiation: prost::encoding::bool::merge::<_>
Unexecuted instantiation: prost::encoding::int32::merge::<_>
Unexecuted instantiation: prost::encoding::int64::merge::<_>
Unexecuted instantiation: prost::encoding::sint32::merge::<_>
Unexecuted instantiation: prost::encoding::sint64::merge::<_>
Unexecuted instantiation: prost::encoding::uint32::merge::<_>
Unexecuted instantiation: prost::encoding::uint64::merge::<_>
prost::encoding::int32::merge::<&mut &[u8]>
Line
Count
Source
504
24.6M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
24.6M
                check_wire_type(WireType::Varint, wire_type)?;
506
24.6M
                let $from_uint64_value = decode_varint(buf)?;
507
24.6M
                *value = $from_uint64;
508
24.6M
                Ok(())
509
24.6M
            }
prost::encoding::sint64::merge::<&mut &[u8]>
Line
Count
Source
504
33.4M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
33.4M
                check_wire_type(WireType::Varint, wire_type)?;
506
33.4M
                let $from_uint64_value = decode_varint(buf)?;
507
33.4M
                *value = $from_uint64;
508
33.4M
                Ok(())
509
33.4M
            }
prost::encoding::bool::merge::<&mut &[u8]>
Line
Count
Source
504
14.0M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
14.0M
                check_wire_type(WireType::Varint, wire_type)?;
506
14.0M
                let $from_uint64_value = decode_varint(buf)?;
507
14.0M
                *value = $from_uint64;
508
14.0M
                Ok(())
509
14.0M
            }
prost::encoding::uint32::merge::<&mut &[u8]>
Line
Count
Source
504
35.4M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
35.4M
                check_wire_type(WireType::Varint, wire_type)?;
506
35.4M
                let $from_uint64_value = decode_varint(buf)?;
507
35.4M
                *value = $from_uint64;
508
35.4M
                Ok(())
509
35.4M
            }
prost::encoding::uint64::merge::<&mut &[u8]>
Line
Count
Source
504
31.8M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
31.8M
                check_wire_type(WireType::Varint, wire_type)?;
506
31.8M
                let $from_uint64_value = decode_varint(buf)?;
507
31.8M
                *value = $from_uint64;
508
31.8M
                Ok(())
509
31.8M
            }
prost::encoding::int64::merge::<&mut &[u8]>
Line
Count
Source
504
89.4M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
89.4M
                check_wire_type(WireType::Varint, wire_type)?;
506
89.4M
                let $from_uint64_value = decode_varint(buf)?;
507
89.4M
                *value = $from_uint64;
508
89.4M
                Ok(())
509
89.4M
            }
prost::encoding::sint32::merge::<&mut &[u8]>
Line
Count
Source
504
322M
            pub fn merge<B>(wire_type: WireType, value: &mut $ty, buf: &mut B, _ctx: DecodeContext) -> Result<(), DecodeError> where B: Buf {
505
322M
                check_wire_type(WireType::Varint, wire_type)?;
506
322M
                let $from_uint64_value = decode_varint(buf)?;
507
322M
                *value = $from_uint64;
508
322M
                Ok(())
509
322M
            }
510
511
            encode_repeated!($ty);
512
513
8.54M
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
8.54M
                if values.is_empty() { return; }
515
516
99.4k
                encode_key(tag, WireType::LengthDelimited, buf);
517
5.41M
                let len: usize = values.iter().map(|$to_uint64_value| {
518
5.41M
                    encoded_len_varint($to_uint64)
519
5.41M
                }).sum();
prost::encoding::uint64::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
629k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
629k
                    encoded_len_varint($to_uint64)
519
629k
                }).sum();
prost::encoding::uint32::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
37.4k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
37.4k
                    encoded_len_varint($to_uint64)
519
37.4k
                }).sum();
prost::encoding::sint32::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
37.7k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
37.7k
                    encoded_len_varint($to_uint64)
519
37.7k
                }).sum();
prost::encoding::bool::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
45.2k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
45.2k
                    encoded_len_varint($to_uint64)
519
45.2k
                }).sum();
prost::encoding::sint64::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
2.16M
                let len: usize = values.iter().map(|$to_uint64_value| {
518
2.16M
                    encoded_len_varint($to_uint64)
519
2.16M
                }).sum();
prost::encoding::int64::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
123k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
123k
                    encoded_len_varint($to_uint64)
519
123k
                }).sum();
prost::encoding::int32::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
300k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
300k
                    encoded_len_varint($to_uint64)
519
300k
                }).sum();
Unexecuted instantiation: prost::encoding::bool::encode_packed::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::int32::encode_packed::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::int64::encode_packed::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::sint32::encode_packed::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::sint64::encode_packed::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::uint32::encode_packed::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::uint64::encode_packed::<_>::{closure#0}
prost::encoding::int32::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
101k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
101k
                    encoded_len_varint($to_uint64)
519
101k
                }).sum();
prost::encoding::sint64::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
68.2k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
68.2k
                    encoded_len_varint($to_uint64)
519
68.2k
                }).sum();
prost::encoding::bool::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
134k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
134k
                    encoded_len_varint($to_uint64)
519
134k
                }).sum();
prost::encoding::uint32::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
564k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
564k
                    encoded_len_varint($to_uint64)
519
564k
                }).sum();
prost::encoding::uint64::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
74.8k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
74.8k
                    encoded_len_varint($to_uint64)
519
74.8k
                }).sum();
prost::encoding::int64::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
65.0k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
65.0k
                    encoded_len_varint($to_uint64)
519
65.0k
                }).sum();
prost::encoding::sint32::encode_packed::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
517
1.07M
                let len: usize = values.iter().map(|$to_uint64_value| {
518
1.07M
                    encoded_len_varint($to_uint64)
519
1.07M
                }).sum();
520
99.4k
                encode_varint(len as u64, buf);
521
522
5.51M
                for $to_uint64_value in values {
523
5.41M
                    encode_varint($to_uint64, buf);
524
5.41M
                }
525
8.54M
            }
prost::encoding::uint64::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
787k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
787k
                if values.is_empty() { return; }
515
516
10.0k
                encode_key(tag, WireType::LengthDelimited, buf);
517
10.0k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
10.0k
                }).sum();
520
10.0k
                encode_varint(len as u64, buf);
521
522
639k
                for $to_uint64_value in values {
523
629k
                    encode_varint($to_uint64, buf);
524
629k
                }
525
787k
            }
prost::encoding::uint32::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
787k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
787k
                if values.is_empty() { return; }
515
516
5.75k
                encode_key(tag, WireType::LengthDelimited, buf);
517
5.75k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
5.75k
                }).sum();
520
5.75k
                encode_varint(len as u64, buf);
521
522
43.1k
                for $to_uint64_value in values {
523
37.4k
                    encode_varint($to_uint64, buf);
524
37.4k
                }
525
787k
            }
prost::encoding::sint32::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
787k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
787k
                if values.is_empty() { return; }
515
516
9.24k
                encode_key(tag, WireType::LengthDelimited, buf);
517
9.24k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
9.24k
                }).sum();
520
9.24k
                encode_varint(len as u64, buf);
521
522
46.9k
                for $to_uint64_value in values {
523
37.7k
                    encode_varint($to_uint64, buf);
524
37.7k
                }
525
787k
            }
prost::encoding::bool::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
787k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
787k
                if values.is_empty() { return; }
515
516
8.51k
                encode_key(tag, WireType::LengthDelimited, buf);
517
8.51k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
8.51k
                }).sum();
520
8.51k
                encode_varint(len as u64, buf);
521
522
53.7k
                for $to_uint64_value in values {
523
45.2k
                    encode_varint($to_uint64, buf);
524
45.2k
                }
525
787k
            }
prost::encoding::sint64::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
787k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
787k
                if values.is_empty() { return; }
515
516
5.75k
                encode_key(tag, WireType::LengthDelimited, buf);
517
5.75k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
5.75k
                }).sum();
520
5.75k
                encode_varint(len as u64, buf);
521
522
2.16M
                for $to_uint64_value in values {
523
2.16M
                    encode_varint($to_uint64, buf);
524
2.16M
                }
525
787k
            }
prost::encoding::int64::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
787k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
787k
                if values.is_empty() { return; }
515
516
13.7k
                encode_key(tag, WireType::LengthDelimited, buf);
517
13.7k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
13.7k
                }).sum();
520
13.7k
                encode_varint(len as u64, buf);
521
522
137k
                for $to_uint64_value in values {
523
123k
                    encode_varint($to_uint64, buf);
524
123k
                }
525
787k
            }
prost::encoding::int32::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
1.96M
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
1.96M
                if values.is_empty() { return; }
515
516
18.3k
                encode_key(tag, WireType::LengthDelimited, buf);
517
18.3k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
18.3k
                }).sum();
520
18.3k
                encode_varint(len as u64, buf);
521
522
319k
                for $to_uint64_value in values {
523
300k
                    encode_varint($to_uint64, buf);
524
300k
                }
525
1.96M
            }
Unexecuted instantiation: prost::encoding::bool::encode_packed::<_>
Unexecuted instantiation: prost::encoding::int32::encode_packed::<_>
Unexecuted instantiation: prost::encoding::int64::encode_packed::<_>
Unexecuted instantiation: prost::encoding::sint32::encode_packed::<_>
Unexecuted instantiation: prost::encoding::sint64::encode_packed::<_>
Unexecuted instantiation: prost::encoding::uint32::encode_packed::<_>
Unexecuted instantiation: prost::encoding::uint64::encode_packed::<_>
prost::encoding::int32::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
463k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
463k
                if values.is_empty() { return; }
515
516
5.53k
                encode_key(tag, WireType::LengthDelimited, buf);
517
5.53k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
5.53k
                }).sum();
520
5.53k
                encode_varint(len as u64, buf);
521
522
107k
                for $to_uint64_value in values {
523
101k
                    encode_varint($to_uint64, buf);
524
101k
                }
525
463k
            }
prost::encoding::sint64::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
231k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
231k
                if values.is_empty() { return; }
515
516
2.67k
                encode_key(tag, WireType::LengthDelimited, buf);
517
2.67k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
2.67k
                }).sum();
520
2.67k
                encode_varint(len as u64, buf);
521
522
70.9k
                for $to_uint64_value in values {
523
68.2k
                    encode_varint($to_uint64, buf);
524
68.2k
                }
525
231k
            }
prost::encoding::bool::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
231k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
231k
                if values.is_empty() { return; }
515
516
3.59k
                encode_key(tag, WireType::LengthDelimited, buf);
517
3.59k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
3.59k
                }).sum();
520
3.59k
                encode_varint(len as u64, buf);
521
522
138k
                for $to_uint64_value in values {
523
134k
                    encode_varint($to_uint64, buf);
524
134k
                }
525
231k
            }
prost::encoding::uint32::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
231k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
231k
                if values.is_empty() { return; }
515
516
4.10k
                encode_key(tag, WireType::LengthDelimited, buf);
517
4.10k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
4.10k
                }).sum();
520
4.10k
                encode_varint(len as u64, buf);
521
522
568k
                for $to_uint64_value in values {
523
564k
                    encode_varint($to_uint64, buf);
524
564k
                }
525
231k
            }
prost::encoding::uint64::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
231k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
231k
                if values.is_empty() { return; }
515
516
3.45k
                encode_key(tag, WireType::LengthDelimited, buf);
517
3.45k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
3.45k
                }).sum();
520
3.45k
                encode_varint(len as u64, buf);
521
522
78.3k
                for $to_uint64_value in values {
523
74.8k
                    encode_varint($to_uint64, buf);
524
74.8k
                }
525
231k
            }
prost::encoding::int64::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
231k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
231k
                if values.is_empty() { return; }
515
516
4.15k
                encode_key(tag, WireType::LengthDelimited, buf);
517
4.15k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
4.15k
                }).sum();
520
4.15k
                encode_varint(len as u64, buf);
521
522
69.2k
                for $to_uint64_value in values {
523
65.0k
                    encode_varint($to_uint64, buf);
524
65.0k
                }
525
231k
            }
prost::encoding::sint32::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
513
231k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B) where B: BufMut {
514
231k
                if values.is_empty() { return; }
515
516
4.53k
                encode_key(tag, WireType::LengthDelimited, buf);
517
4.53k
                let len: usize = values.iter().map(|$to_uint64_value| {
518
                    encoded_len_varint($to_uint64)
519
4.53k
                }).sum();
520
4.53k
                encode_varint(len as u64, buf);
521
522
1.07M
                for $to_uint64_value in values {
523
1.07M
                    encode_varint($to_uint64, buf);
524
1.07M
                }
525
231k
            }
526
527
            merge_repeated_numeric!($ty, WireType::Varint, merge, merge_repeated);
528
529
            #[inline]
530
2.49M
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
2.49M
                key_len(tag) + encoded_len_varint($to_uint64)
532
2.49M
            }
prost::encoding::bool::encoded_len
Line
Count
Source
530
154k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
154k
                key_len(tag) + encoded_len_varint($to_uint64)
532
154k
            }
prost::encoding::int64::encoded_len
Line
Count
Source
530
244k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
244k
                key_len(tag) + encoded_len_varint($to_uint64)
532
244k
            }
prost::encoding::uint32::encoded_len
Line
Count
Source
530
115k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
115k
                key_len(tag) + encoded_len_varint($to_uint64)
532
115k
            }
prost::encoding::sint32::encoded_len
Line
Count
Source
530
180k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
180k
                key_len(tag) + encoded_len_varint($to_uint64)
532
180k
            }
prost::encoding::int32::encoded_len
Line
Count
Source
530
747k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
747k
                key_len(tag) + encoded_len_varint($to_uint64)
532
747k
            }
prost::encoding::uint64::encoded_len
Line
Count
Source
530
137k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
137k
                key_len(tag) + encoded_len_varint($to_uint64)
532
137k
            }
prost::encoding::sint64::encoded_len
Line
Count
Source
530
59.5k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
59.5k
                key_len(tag) + encoded_len_varint($to_uint64)
532
59.5k
            }
prost::encoding::uint32::encoded_len
Line
Count
Source
530
10.9k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
10.9k
                key_len(tag) + encoded_len_varint($to_uint64)
532
10.9k
            }
prost::encoding::uint64::encoded_len
Line
Count
Source
530
6.38k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
6.38k
                key_len(tag) + encoded_len_varint($to_uint64)
532
6.38k
            }
prost::encoding::int32::encoded_len
Line
Count
Source
530
11.7k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
11.7k
                key_len(tag) + encoded_len_varint($to_uint64)
532
11.7k
            }
prost::encoding::int64::encoded_len
Line
Count
Source
530
3.60k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
3.60k
                key_len(tag) + encoded_len_varint($to_uint64)
532
3.60k
            }
Unexecuted instantiation: prost::encoding::bool::encoded_len
Unexecuted instantiation: prost::encoding::sint32::encoded_len
Unexecuted instantiation: prost::encoding::sint64::encoded_len
prost::encoding::bool::encoded_len
Line
Count
Source
530
30.4k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
30.4k
                key_len(tag) + encoded_len_varint($to_uint64)
532
30.4k
            }
prost::encoding::sint64::encoded_len
Line
Count
Source
530
23.9k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
23.9k
                key_len(tag) + encoded_len_varint($to_uint64)
532
23.9k
            }
prost::encoding::int64::encoded_len
Line
Count
Source
530
104k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
104k
                key_len(tag) + encoded_len_varint($to_uint64)
532
104k
            }
prost::encoding::uint32::encoded_len
Line
Count
Source
530
75.2k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
75.2k
                key_len(tag) + encoded_len_varint($to_uint64)
532
75.2k
            }
prost::encoding::int32::encoded_len
Line
Count
Source
530
411k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
411k
                key_len(tag) + encoded_len_varint($to_uint64)
532
411k
            }
prost::encoding::uint64::encoded_len
Line
Count
Source
530
61.9k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
61.9k
                key_len(tag) + encoded_len_varint($to_uint64)
532
61.9k
            }
prost::encoding::sint32::encoded_len
Line
Count
Source
530
113k
            pub fn encoded_len(tag: u32, $to_uint64_value: &$ty) -> usize {
531
113k
                key_len(tag) + encoded_len_varint($to_uint64)
532
113k
            }
533
534
            #[inline]
535
25.0M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.59G
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
1.59G
                    encoded_len_varint($to_uint64)
538
1.59G
                }).sum::<usize>()
prost::encoding::uint64::encoded_len_repeated::{closure#0}
Line
Count
Source
536
2.27M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
2.27M
                    encoded_len_varint($to_uint64)
538
2.27M
                }).sum::<usize>()
prost::encoding::uint32::encoded_len_repeated::{closure#0}
Line
Count
Source
536
547M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
547M
                    encoded_len_varint($to_uint64)
538
547M
                }).sum::<usize>()
prost::encoding::sint32::encoded_len_repeated::{closure#0}
Line
Count
Source
536
71.2M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
71.2M
                    encoded_len_varint($to_uint64)
538
71.2M
                }).sum::<usize>()
prost::encoding::bool::encoded_len_repeated::{closure#0}
Line
Count
Source
536
106k
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
106k
                    encoded_len_varint($to_uint64)
538
106k
                }).sum::<usize>()
prost::encoding::sint64::encoded_len_repeated::{closure#0}
Line
Count
Source
536
139M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
139M
                    encoded_len_varint($to_uint64)
538
139M
                }).sum::<usize>()
prost::encoding::int64::encoded_len_repeated::{closure#0}
Line
Count
Source
536
8.86M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
8.86M
                    encoded_len_varint($to_uint64)
538
8.86M
                }).sum::<usize>()
prost::encoding::int32::encoded_len_repeated::{closure#0}
Line
Count
Source
536
10.1M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
10.1M
                    encoded_len_varint($to_uint64)
538
10.1M
                }).sum::<usize>()
Unexecuted instantiation: prost::encoding::bool::encoded_len_repeated::{closure#0}
Unexecuted instantiation: prost::encoding::int32::encoded_len_repeated::{closure#0}
Unexecuted instantiation: prost::encoding::int64::encoded_len_repeated::{closure#0}
Unexecuted instantiation: prost::encoding::sint32::encoded_len_repeated::{closure#0}
Unexecuted instantiation: prost::encoding::sint64::encoded_len_repeated::{closure#0}
Unexecuted instantiation: prost::encoding::uint32::encoded_len_repeated::{closure#0}
Unexecuted instantiation: prost::encoding::uint64::encoded_len_repeated::{closure#0}
prost::encoding::int32::encoded_len_repeated::{closure#0}
Line
Count
Source
536
33.8M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
33.8M
                    encoded_len_varint($to_uint64)
538
33.8M
                }).sum::<usize>()
prost::encoding::sint64::encoded_len_repeated::{closure#0}
Line
Count
Source
536
49.1M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
49.1M
                    encoded_len_varint($to_uint64)
538
49.1M
                }).sum::<usize>()
prost::encoding::bool::encoded_len_repeated::{closure#0}
Line
Count
Source
536
20.5M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
20.5M
                    encoded_len_varint($to_uint64)
538
20.5M
                }).sum::<usize>()
prost::encoding::uint32::encoded_len_repeated::{closure#0}
Line
Count
Source
536
52.2M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
52.2M
                    encoded_len_varint($to_uint64)
538
52.2M
                }).sum::<usize>()
prost::encoding::uint64::encoded_len_repeated::{closure#0}
Line
Count
Source
536
46.7M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
46.7M
                    encoded_len_varint($to_uint64)
538
46.7M
                }).sum::<usize>()
prost::encoding::int64::encoded_len_repeated::{closure#0}
Line
Count
Source
536
133M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
133M
                    encoded_len_varint($to_uint64)
538
133M
                }).sum::<usize>()
prost::encoding::sint32::encoded_len_repeated::{closure#0}
Line
Count
Source
536
481M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
481M
                    encoded_len_varint($to_uint64)
538
481M
                }).sum::<usize>()
539
25.0M
            }
prost::encoding::bool::encoded_len_repeated
Line
Count
Source
535
1.43M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.43M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
1.43M
                }).sum::<usize>()
539
1.43M
            }
prost::encoding::int64::encoded_len_repeated
Line
Count
Source
535
1.43M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.43M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
1.43M
                }).sum::<usize>()
539
1.43M
            }
prost::encoding::uint32::encoded_len_repeated
Line
Count
Source
535
1.43M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.43M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
1.43M
                }).sum::<usize>()
539
1.43M
            }
prost::encoding::sint32::encoded_len_repeated
Line
Count
Source
535
1.43M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.43M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
1.43M
                }).sum::<usize>()
539
1.43M
            }
prost::encoding::int32::encoded_len_repeated
Line
Count
Source
535
2.86M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
2.86M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
2.86M
                }).sum::<usize>()
539
2.86M
            }
prost::encoding::uint64::encoded_len_repeated
Line
Count
Source
535
1.43M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.43M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
1.43M
                }).sum::<usize>()
539
1.43M
            }
prost::encoding::sint64::encoded_len_repeated
Line
Count
Source
535
1.43M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.43M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
1.43M
                }).sum::<usize>()
539
1.43M
            }
Unexecuted instantiation: prost::encoding::bool::encoded_len_repeated
Unexecuted instantiation: prost::encoding::int32::encoded_len_repeated
Unexecuted instantiation: prost::encoding::int64::encoded_len_repeated
Unexecuted instantiation: prost::encoding::sint32::encoded_len_repeated
Unexecuted instantiation: prost::encoding::sint64::encoded_len_repeated
Unexecuted instantiation: prost::encoding::uint32::encoded_len_repeated
Unexecuted instantiation: prost::encoding::uint64::encoded_len_repeated
prost::encoding::bool::encoded_len_repeated
Line
Count
Source
535
1.60M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.60M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
1.60M
                }).sum::<usize>()
539
1.60M
            }
prost::encoding::sint64::encoded_len_repeated
Line
Count
Source
535
1.60M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.60M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
1.60M
                }).sum::<usize>()
539
1.60M
            }
prost::encoding::int64::encoded_len_repeated
Line
Count
Source
535
1.60M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.60M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
1.60M
                }).sum::<usize>()
539
1.60M
            }
prost::encoding::uint32::encoded_len_repeated
Line
Count
Source
535
1.60M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.60M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
1.60M
                }).sum::<usize>()
539
1.60M
            }
prost::encoding::int32::encoded_len_repeated
Line
Count
Source
535
4.00M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
4.00M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
4.00M
                }).sum::<usize>()
539
4.00M
            }
prost::encoding::uint64::encoded_len_repeated
Line
Count
Source
535
1.60M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.60M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
1.60M
                }).sum::<usize>()
539
1.60M
            }
prost::encoding::sint32::encoded_len_repeated
Line
Count
Source
535
1.60M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
536
1.60M
                key_len(tag) * values.len() + values.iter().map(|$to_uint64_value| {
537
                    encoded_len_varint($to_uint64)
538
1.60M
                }).sum::<usize>()
539
1.60M
            }
540
541
            #[inline]
542
30.7M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
30.7M
                if values.is_empty() {
544
30.4M
                    0
545
                } else {
546
320k
                    let len = values.iter()
547
8.37M
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
prost::encoding::uint64::encoded_len_packed::{closure#0}
Line
Count
Source
547
1.02M
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
prost::encoding::uint32::encoded_len_packed::{closure#0}
Line
Count
Source
547
83.0k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
prost::encoding::sint32::encoded_len_packed::{closure#0}
Line
Count
Source
547
88.7k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
prost::encoding::sint64::encoded_len_packed::{closure#0}
Line
Count
Source
547
3.27M
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
prost::encoding::int64::encoded_len_packed::{closure#0}
Line
Count
Source
547
334k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
prost::encoding::int32::encoded_len_packed::{closure#0}
Line
Count
Source
547
521k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
Unexecuted instantiation: prost::encoding::int32::encoded_len_packed::{closure#0}
Unexecuted instantiation: prost::encoding::int64::encoded_len_packed::{closure#0}
Unexecuted instantiation: prost::encoding::sint32::encoded_len_packed::{closure#0}
Unexecuted instantiation: prost::encoding::sint64::encoded_len_packed::{closure#0}
Unexecuted instantiation: prost::encoding::uint32::encoded_len_packed::{closure#0}
Unexecuted instantiation: prost::encoding::uint64::encoded_len_packed::{closure#0}
prost::encoding::int32::encoded_len_packed::{closure#0}
Line
Count
Source
547
195k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
prost::encoding::sint64::encoded_len_packed::{closure#0}
Line
Count
Source
547
113k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
prost::encoding::uint32::encoded_len_packed::{closure#0}
Line
Count
Source
547
864k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
prost::encoding::uint64::encoded_len_packed::{closure#0}
Line
Count
Source
547
123k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
prost::encoding::int64::encoded_len_packed::{closure#0}
Line
Count
Source
547
121k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
prost::encoding::sint32::encoded_len_packed::{closure#0}
Line
Count
Source
547
1.62M
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
320k
                                    .sum::<usize>();
549
320k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
30.7M
            }
prost::encoding::bool::encoded_len_packed
Line
Count
Source
542
2.86M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
2.86M
                if values.is_empty() {
544
2.83M
                    0
545
                } else {
546
30.5k
                    let len = values.iter()
547
30.5k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
30.5k
                                    .sum::<usize>();
549
30.5k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
2.86M
            }
prost::encoding::int64::encoded_len_packed
Line
Count
Source
542
2.86M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
2.86M
                if values.is_empty() {
544
2.81M
                    0
545
                } else {
546
46.5k
                    let len = values.iter()
547
46.5k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
46.5k
                                    .sum::<usize>();
549
46.5k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
2.86M
            }
prost::encoding::uint32::encoded_len_packed
Line
Count
Source
542
2.86M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
2.86M
                if values.is_empty() {
544
2.84M
                    0
545
                } else {
546
19.8k
                    let len = values.iter()
547
19.8k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
19.8k
                                    .sum::<usize>();
549
19.8k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
2.86M
            }
prost::encoding::sint32::encoded_len_packed
Line
Count
Source
542
2.86M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
2.86M
                if values.is_empty() {
544
2.83M
                    0
545
                } else {
546
32.2k
                    let len = values.iter()
547
32.2k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
32.2k
                                    .sum::<usize>();
549
32.2k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
2.86M
            }
prost::encoding::int32::encoded_len_packed
Line
Count
Source
542
7.15M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
7.15M
                if values.is_empty() {
544
7.09M
                    0
545
                } else {
546
61.4k
                    let len = values.iter()
547
61.4k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
61.4k
                                    .sum::<usize>();
549
61.4k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
7.15M
            }
prost::encoding::uint64::encoded_len_packed
Line
Count
Source
542
2.86M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
2.86M
                if values.is_empty() {
544
2.83M
                    0
545
                } else {
546
30.8k
                    let len = values.iter()
547
30.8k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
30.8k
                                    .sum::<usize>();
549
30.8k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
2.86M
            }
prost::encoding::sint64::encoded_len_packed
Line
Count
Source
542
2.86M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
2.86M
                if values.is_empty() {
544
2.84M
                    0
545
                } else {
546
17.9k
                    let len = values.iter()
547
17.9k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
17.9k
                                    .sum::<usize>();
549
17.9k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
2.86M
            }
Unexecuted instantiation: prost::encoding::bool::encoded_len_packed
Unexecuted instantiation: prost::encoding::int32::encoded_len_packed
Unexecuted instantiation: prost::encoding::int64::encoded_len_packed
Unexecuted instantiation: prost::encoding::sint32::encoded_len_packed
Unexecuted instantiation: prost::encoding::sint64::encoded_len_packed
Unexecuted instantiation: prost::encoding::uint32::encoded_len_packed
Unexecuted instantiation: prost::encoding::uint64::encoded_len_packed
prost::encoding::bool::encoded_len_packed
Line
Count
Source
542
800k
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
800k
                if values.is_empty() {
544
792k
                    0
545
                } else {
546
8.82k
                    let len = values.iter()
547
8.82k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
8.82k
                                    .sum::<usize>();
549
8.82k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
800k
            }
prost::encoding::sint64::encoded_len_packed
Line
Count
Source
542
800k
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
800k
                if values.is_empty() {
544
793k
                    0
545
                } else {
546
7.50k
                    let len = values.iter()
547
7.50k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
7.50k
                                    .sum::<usize>();
549
7.50k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
800k
            }
prost::encoding::int64::encoded_len_packed
Line
Count
Source
542
800k
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
800k
                if values.is_empty() {
544
788k
                    0
545
                } else {
546
12.7k
                    let len = values.iter()
547
12.7k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
12.7k
                                    .sum::<usize>();
549
12.7k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
800k
            }
prost::encoding::uint32::encoded_len_packed
Line
Count
Source
542
800k
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
800k
                if values.is_empty() {
544
788k
                    0
545
                } else {
546
12.4k
                    let len = values.iter()
547
12.4k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
12.4k
                                    .sum::<usize>();
549
12.4k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
800k
            }
prost::encoding::int32::encoded_len_packed
Line
Count
Source
542
1.60M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
1.60M
                if values.is_empty() {
544
1.58M
                    0
545
                } else {
546
16.6k
                    let len = values.iter()
547
16.6k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
16.6k
                                    .sum::<usize>();
549
16.6k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
1.60M
            }
prost::encoding::uint64::encoded_len_packed
Line
Count
Source
542
800k
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
800k
                if values.is_empty() {
544
791k
                    0
545
                } else {
546
9.47k
                    let len = values.iter()
547
9.47k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
9.47k
                                    .sum::<usize>();
549
9.47k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
800k
            }
prost::encoding::sint32::encoded_len_packed
Line
Count
Source
542
800k
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
543
800k
                if values.is_empty() {
544
788k
                    0
545
                } else {
546
12.9k
                    let len = values.iter()
547
12.9k
                                    .map(|$to_uint64_value| encoded_len_varint($to_uint64))
548
12.9k
                                    .sum::<usize>();
549
12.9k
                    key_len(tag) + encoded_len_varint(len as u64) + len
550
                }
551
800k
            }
552
553
            #[cfg(test)]
554
            mod test {
555
                use proptest::prelude::*;
556
557
                use crate::encoding::$proto_ty::*;
558
                use crate::encoding::test::{
559
                    check_collection_type,
560
                    check_type,
561
                };
562
563
                proptest! {
564
                    #[test]
565
                    fn check(value: $ty, tag in MIN_TAG..=MAX_TAG) {
566
                        check_type(value, tag, WireType::Varint,
567
                                   encode, merge, encoded_len)?;
568
                    }
569
                    #[test]
570
                    fn check_repeated(value: Vec<$ty>, tag in MIN_TAG..=MAX_TAG) {
571
                        check_collection_type(value, tag, WireType::Varint,
572
                                              encode_repeated, merge_repeated,
573
                                              encoded_len_repeated)?;
574
                    }
575
                    #[test]
576
                    fn check_packed(value: Vec<$ty>, tag in MIN_TAG..=MAX_TAG) {
577
                        check_type(value, tag, WireType::LengthDelimited,
578
                                   encode_packed, merge_repeated,
579
                                   encoded_len_packed)?;
580
                    }
581
                }
582
            }
583
         }
584
585
    );
586
}
587
varint!(bool, bool,
588
        to_uint64(value) if *value { 1u64 } else { 0u64 },
589
        from_uint64(value) value != 0);
590
varint!(i32, int32);
591
varint!(i64, int64);
592
varint!(u32, uint32);
593
varint!(u64, uint64);
594
varint!(i32, sint32,
595
to_uint64(value) {
596
    ((value << 1) ^ (value >> 31)) as u32 as u64
597
},
598
from_uint64(value) {
599
    let value = value as u32;
600
    ((value >> 1) as i32) ^ (-((value & 1) as i32))
601
});
602
varint!(i64, sint64,
603
to_uint64(value) {
604
    ((value << 1) ^ (value >> 63)) as u64
605
},
606
from_uint64(value) {
607
    ((value >> 1) as i64) ^ (-((value & 1) as i64))
608
});
609
610
/// Macro which emits a module containing a set of encoding functions for a
611
/// fixed width numeric type.
612
macro_rules! fixed_width {
613
    ($ty:ty,
614
     $width:expr,
615
     $wire_type:expr,
616
     $proto_ty:ident,
617
     $put:ident,
618
     $get:ident) => {
619
        pub mod $proto_ty {
620
            use crate::encoding::*;
621
622
1.39M
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
1.39M
            where
624
1.39M
                B: BufMut,
625
            {
626
1.39M
                encode_key(tag, $wire_type, buf);
627
1.39M
                buf.$put(*value);
628
1.39M
            }
prost::encoding::sfixed64::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
622
23.9k
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
23.9k
            where
624
23.9k
                B: BufMut,
625
            {
626
23.9k
                encode_key(tag, $wire_type, buf);
627
23.9k
                buf.$put(*value);
628
23.9k
            }
prost::encoding::fixed64::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
622
21.9k
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
21.9k
            where
624
21.9k
                B: BufMut,
625
            {
626
21.9k
                encode_key(tag, $wire_type, buf);
627
21.9k
                buf.$put(*value);
628
21.9k
            }
prost::encoding::fixed32::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
622
758k
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
758k
            where
624
758k
                B: BufMut,
625
            {
626
758k
                encode_key(tag, $wire_type, buf);
627
758k
                buf.$put(*value);
628
758k
            }
prost::encoding::sfixed32::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
622
25.4k
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
25.4k
            where
624
25.4k
                B: BufMut,
625
            {
626
25.4k
                encode_key(tag, $wire_type, buf);
627
25.4k
                buf.$put(*value);
628
25.4k
            }
prost::encoding::float::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
622
23.7k
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
23.7k
            where
624
23.7k
                B: BufMut,
625
            {
626
23.7k
                encode_key(tag, $wire_type, buf);
627
23.7k
                buf.$put(*value);
628
23.7k
            }
prost::encoding::double::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
622
42.0k
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
42.0k
            where
624
42.0k
                B: BufMut,
625
            {
626
42.0k
                encode_key(tag, $wire_type, buf);
627
42.0k
                buf.$put(*value);
628
42.0k
            }
Unexecuted instantiation: prost::encoding::float::encode::<_>
Unexecuted instantiation: prost::encoding::double::encode::<_>
Unexecuted instantiation: prost::encoding::fixed32::encode::<_>
Unexecuted instantiation: prost::encoding::fixed64::encode::<_>
Unexecuted instantiation: prost::encoding::sfixed32::encode::<_>
Unexecuted instantiation: prost::encoding::sfixed64::encode::<_>
prost::encoding::float::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
622
125k
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
125k
            where
624
125k
                B: BufMut,
625
            {
626
125k
                encode_key(tag, $wire_type, buf);
627
125k
                buf.$put(*value);
628
125k
            }
prost::encoding::sfixed32::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
622
52.3k
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
52.3k
            where
624
52.3k
                B: BufMut,
625
            {
626
52.3k
                encode_key(tag, $wire_type, buf);
627
52.3k
                buf.$put(*value);
628
52.3k
            }
prost::encoding::sfixed64::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
622
155k
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
155k
            where
624
155k
                B: BufMut,
625
            {
626
155k
                encode_key(tag, $wire_type, buf);
627
155k
                buf.$put(*value);
628
155k
            }
prost::encoding::fixed64::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
622
50.6k
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
50.6k
            where
624
50.6k
                B: BufMut,
625
            {
626
50.6k
                encode_key(tag, $wire_type, buf);
627
50.6k
                buf.$put(*value);
628
50.6k
            }
prost::encoding::double::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
622
36.3k
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
36.3k
            where
624
36.3k
                B: BufMut,
625
            {
626
36.3k
                encode_key(tag, $wire_type, buf);
627
36.3k
                buf.$put(*value);
628
36.3k
            }
prost::encoding::fixed32::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
622
73.8k
            pub fn encode<B>(tag: u32, value: &$ty, buf: &mut B)
623
73.8k
            where
624
73.8k
                B: BufMut,
625
            {
626
73.8k
                encode_key(tag, $wire_type, buf);
627
73.8k
                buf.$put(*value);
628
73.8k
            }
629
630
5.26M
            pub fn merge<B>(
631
5.26M
                wire_type: WireType,
632
5.26M
                value: &mut $ty,
633
5.26M
                buf: &mut B,
634
5.26M
                _ctx: DecodeContext,
635
5.26M
            ) -> Result<(), DecodeError>
636
5.26M
            where
637
5.26M
                B: Buf,
638
            {
639
5.26M
                check_wire_type($wire_type, wire_type)?;
640
5.26M
                if buf.remaining() < $width {
641
335
                    return Err(DecodeError::new("buffer underflow"));
642
5.26M
                }
643
5.26M
                *value = buf.$get();
644
5.26M
                Ok(())
645
5.26M
            }
prost::encoding::sfixed64::merge::<&mut &[u8]>
Line
Count
Source
630
346k
            pub fn merge<B>(
631
346k
                wire_type: WireType,
632
346k
                value: &mut $ty,
633
346k
                buf: &mut B,
634
346k
                _ctx: DecodeContext,
635
346k
            ) -> Result<(), DecodeError>
636
346k
            where
637
346k
                B: Buf,
638
            {
639
346k
                check_wire_type($wire_type, wire_type)?;
640
346k
                if buf.remaining() < $width {
641
21
                    return Err(DecodeError::new("buffer underflow"));
642
346k
                }
643
346k
                *value = buf.$get();
644
346k
                Ok(())
645
346k
            }
prost::encoding::fixed64::merge::<&mut &[u8]>
Line
Count
Source
630
237k
            pub fn merge<B>(
631
237k
                wire_type: WireType,
632
237k
                value: &mut $ty,
633
237k
                buf: &mut B,
634
237k
                _ctx: DecodeContext,
635
237k
            ) -> Result<(), DecodeError>
636
237k
            where
637
237k
                B: Buf,
638
            {
639
237k
                check_wire_type($wire_type, wire_type)?;
640
237k
                if buf.remaining() < $width {
641
23
                    return Err(DecodeError::new("buffer underflow"));
642
237k
                }
643
237k
                *value = buf.$get();
644
237k
                Ok(())
645
237k
            }
prost::encoding::fixed32::merge::<&mut &[u8]>
Line
Count
Source
630
1.07M
            pub fn merge<B>(
631
1.07M
                wire_type: WireType,
632
1.07M
                value: &mut $ty,
633
1.07M
                buf: &mut B,
634
1.07M
                _ctx: DecodeContext,
635
1.07M
            ) -> Result<(), DecodeError>
636
1.07M
            where
637
1.07M
                B: Buf,
638
            {
639
1.07M
                check_wire_type($wire_type, wire_type)?;
640
1.07M
                if buf.remaining() < $width {
641
12
                    return Err(DecodeError::new("buffer underflow"));
642
1.07M
                }
643
1.07M
                *value = buf.$get();
644
1.07M
                Ok(())
645
1.07M
            }
prost::encoding::sfixed32::merge::<&mut &[u8]>
Line
Count
Source
630
207k
            pub fn merge<B>(
631
207k
                wire_type: WireType,
632
207k
                value: &mut $ty,
633
207k
                buf: &mut B,
634
207k
                _ctx: DecodeContext,
635
207k
            ) -> Result<(), DecodeError>
636
207k
            where
637
207k
                B: Buf,
638
            {
639
207k
                check_wire_type($wire_type, wire_type)?;
640
207k
                if buf.remaining() < $width {
641
20
                    return Err(DecodeError::new("buffer underflow"));
642
207k
                }
643
207k
                *value = buf.$get();
644
207k
                Ok(())
645
207k
            }
prost::encoding::float::merge::<&mut &[u8]>
Line
Count
Source
630
1.12M
            pub fn merge<B>(
631
1.12M
                wire_type: WireType,
632
1.12M
                value: &mut $ty,
633
1.12M
                buf: &mut B,
634
1.12M
                _ctx: DecodeContext,
635
1.12M
            ) -> Result<(), DecodeError>
636
1.12M
            where
637
1.12M
                B: Buf,
638
            {
639
1.12M
                check_wire_type($wire_type, wire_type)?;
640
1.12M
                if buf.remaining() < $width {
641
35
                    return Err(DecodeError::new("buffer underflow"));
642
1.12M
                }
643
1.12M
                *value = buf.$get();
644
1.12M
                Ok(())
645
1.12M
            }
prost::encoding::double::merge::<&mut &[u8]>
Line
Count
Source
630
205k
            pub fn merge<B>(
631
205k
                wire_type: WireType,
632
205k
                value: &mut $ty,
633
205k
                buf: &mut B,
634
205k
                _ctx: DecodeContext,
635
205k
            ) -> Result<(), DecodeError>
636
205k
            where
637
205k
                B: Buf,
638
            {
639
205k
                check_wire_type($wire_type, wire_type)?;
640
205k
                if buf.remaining() < $width {
641
29
                    return Err(DecodeError::new("buffer underflow"));
642
205k
                }
643
205k
                *value = buf.$get();
644
205k
                Ok(())
645
205k
            }
Unexecuted instantiation: prost::encoding::float::merge::<_>
Unexecuted instantiation: prost::encoding::double::merge::<_>
Unexecuted instantiation: prost::encoding::fixed32::merge::<_>
Unexecuted instantiation: prost::encoding::fixed64::merge::<_>
Unexecuted instantiation: prost::encoding::sfixed32::merge::<_>
Unexecuted instantiation: prost::encoding::sfixed64::merge::<_>
prost::encoding::float::merge::<&mut &[u8]>
Line
Count
Source
630
359k
            pub fn merge<B>(
631
359k
                wire_type: WireType,
632
359k
                value: &mut $ty,
633
359k
                buf: &mut B,
634
359k
                _ctx: DecodeContext,
635
359k
            ) -> Result<(), DecodeError>
636
359k
            where
637
359k
                B: Buf,
638
            {
639
359k
                check_wire_type($wire_type, wire_type)?;
640
359k
                if buf.remaining() < $width {
641
28
                    return Err(DecodeError::new("buffer underflow"));
642
359k
                }
643
359k
                *value = buf.$get();
644
359k
                Ok(())
645
359k
            }
prost::encoding::sfixed32::merge::<&mut &[u8]>
Line
Count
Source
630
534k
            pub fn merge<B>(
631
534k
                wire_type: WireType,
632
534k
                value: &mut $ty,
633
534k
                buf: &mut B,
634
534k
                _ctx: DecodeContext,
635
534k
            ) -> Result<(), DecodeError>
636
534k
            where
637
534k
                B: Buf,
638
            {
639
534k
                check_wire_type($wire_type, wire_type)?;
640
534k
                if buf.remaining() < $width {
641
28
                    return Err(DecodeError::new("buffer underflow"));
642
534k
                }
643
534k
                *value = buf.$get();
644
534k
                Ok(())
645
534k
            }
prost::encoding::sfixed64::merge::<&mut &[u8]>
Line
Count
Source
630
411k
            pub fn merge<B>(
631
411k
                wire_type: WireType,
632
411k
                value: &mut $ty,
633
411k
                buf: &mut B,
634
411k
                _ctx: DecodeContext,
635
411k
            ) -> Result<(), DecodeError>
636
411k
            where
637
411k
                B: Buf,
638
            {
639
411k
                check_wire_type($wire_type, wire_type)?;
640
411k
                if buf.remaining() < $width {
641
36
                    return Err(DecodeError::new("buffer underflow"));
642
411k
                }
643
411k
                *value = buf.$get();
644
411k
                Ok(())
645
411k
            }
prost::encoding::fixed64::merge::<&mut &[u8]>
Line
Count
Source
630
253k
            pub fn merge<B>(
631
253k
                wire_type: WireType,
632
253k
                value: &mut $ty,
633
253k
                buf: &mut B,
634
253k
                _ctx: DecodeContext,
635
253k
            ) -> Result<(), DecodeError>
636
253k
            where
637
253k
                B: Buf,
638
            {
639
253k
                check_wire_type($wire_type, wire_type)?;
640
253k
                if buf.remaining() < $width {
641
40
                    return Err(DecodeError::new("buffer underflow"));
642
252k
                }
643
252k
                *value = buf.$get();
644
252k
                Ok(())
645
253k
            }
prost::encoding::double::merge::<&mut &[u8]>
Line
Count
Source
630
186k
            pub fn merge<B>(
631
186k
                wire_type: WireType,
632
186k
                value: &mut $ty,
633
186k
                buf: &mut B,
634
186k
                _ctx: DecodeContext,
635
186k
            ) -> Result<(), DecodeError>
636
186k
            where
637
186k
                B: Buf,
638
            {
639
186k
                check_wire_type($wire_type, wire_type)?;
640
186k
                if buf.remaining() < $width {
641
35
                    return Err(DecodeError::new("buffer underflow"));
642
186k
                }
643
186k
                *value = buf.$get();
644
186k
                Ok(())
645
186k
            }
prost::encoding::fixed32::merge::<&mut &[u8]>
Line
Count
Source
630
318k
            pub fn merge<B>(
631
318k
                wire_type: WireType,
632
318k
                value: &mut $ty,
633
318k
                buf: &mut B,
634
318k
                _ctx: DecodeContext,
635
318k
            ) -> Result<(), DecodeError>
636
318k
            where
637
318k
                B: Buf,
638
            {
639
318k
                check_wire_type($wire_type, wire_type)?;
640
318k
                if buf.remaining() < $width {
641
28
                    return Err(DecodeError::new("buffer underflow"));
642
318k
                }
643
318k
                *value = buf.$get();
644
318k
                Ok(())
645
318k
            }
646
647
            encode_repeated!($ty);
648
649
6.11M
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
6.11M
            where
651
6.11M
                B: BufMut,
652
            {
653
6.11M
                if values.is_empty() {
654
6.03M
                    return;
655
73.8k
                }
656
657
73.8k
                encode_key(tag, WireType::LengthDelimited, buf);
658
73.8k
                let len = values.len() as u64 * $width;
659
73.8k
                encode_varint(len as u64, buf);
660
661
1.76M
                for value in values {
662
1.68M
                    buf.$put(*value);
663
1.68M
                }
664
6.11M
            }
prost::encoding::sfixed64::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
649
787k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
787k
            where
651
787k
                B: BufMut,
652
            {
653
787k
                if values.is_empty() {
654
782k
                    return;
655
4.44k
                }
656
657
4.44k
                encode_key(tag, WireType::LengthDelimited, buf);
658
4.44k
                let len = values.len() as u64 * $width;
659
4.44k
                encode_varint(len as u64, buf);
660
661
111k
                for value in values {
662
107k
                    buf.$put(*value);
663
107k
                }
664
787k
            }
prost::encoding::fixed64::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
649
787k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
787k
            where
651
787k
                B: BufMut,
652
            {
653
787k
                if values.is_empty() {
654
775k
                    return;
655
11.7k
                }
656
657
11.7k
                encode_key(tag, WireType::LengthDelimited, buf);
658
11.7k
                let len = values.len() as u64 * $width;
659
11.7k
                encode_varint(len as u64, buf);
660
661
71.1k
                for value in values {
662
59.3k
                    buf.$put(*value);
663
59.3k
                }
664
787k
            }
prost::encoding::fixed32::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
649
787k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
787k
            where
651
787k
                B: BufMut,
652
            {
653
787k
                if values.is_empty() {
654
784k
                    return;
655
2.84k
                }
656
657
2.84k
                encode_key(tag, WireType::LengthDelimited, buf);
658
2.84k
                let len = values.len() as u64 * $width;
659
2.84k
                encode_varint(len as u64, buf);
660
661
14.9k
                for value in values {
662
12.1k
                    buf.$put(*value);
663
12.1k
                }
664
787k
            }
prost::encoding::sfixed32::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
649
787k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
787k
            where
651
787k
                B: BufMut,
652
            {
653
787k
                if values.is_empty() {
654
782k
                    return;
655
4.48k
                }
656
657
4.48k
                encode_key(tag, WireType::LengthDelimited, buf);
658
4.48k
                let len = values.len() as u64 * $width;
659
4.48k
                encode_varint(len as u64, buf);
660
661
53.7k
                for value in values {
662
49.2k
                    buf.$put(*value);
663
49.2k
                }
664
787k
            }
prost::encoding::float::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
649
787k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
787k
            where
651
787k
                B: BufMut,
652
            {
653
787k
                if values.is_empty() {
654
782k
                    return;
655
5.10k
                }
656
657
5.10k
                encode_key(tag, WireType::LengthDelimited, buf);
658
5.10k
                let len = values.len() as u64 * $width;
659
5.10k
                encode_varint(len as u64, buf);
660
661
885k
                for value in values {
662
879k
                    buf.$put(*value);
663
879k
                }
664
787k
            }
prost::encoding::double::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
649
787k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
787k
            where
651
787k
                B: BufMut,
652
            {
653
787k
                if values.is_empty() {
654
781k
                    return;
655
5.58k
                }
656
657
5.58k
                encode_key(tag, WireType::LengthDelimited, buf);
658
5.58k
                let len = values.len() as u64 * $width;
659
5.58k
                encode_varint(len as u64, buf);
660
661
147k
                for value in values {
662
141k
                    buf.$put(*value);
663
141k
                }
664
787k
            }
Unexecuted instantiation: prost::encoding::float::encode_packed::<_>
Unexecuted instantiation: prost::encoding::double::encode_packed::<_>
Unexecuted instantiation: prost::encoding::fixed32::encode_packed::<_>
Unexecuted instantiation: prost::encoding::fixed64::encode_packed::<_>
Unexecuted instantiation: prost::encoding::sfixed32::encode_packed::<_>
Unexecuted instantiation: prost::encoding::sfixed64::encode_packed::<_>
prost::encoding::float::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
649
231k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
231k
            where
651
231k
                B: BufMut,
652
            {
653
231k
                if values.is_empty() {
654
227k
                    return;
655
4.35k
                }
656
657
4.35k
                encode_key(tag, WireType::LengthDelimited, buf);
658
4.35k
                let len = values.len() as u64 * $width;
659
4.35k
                encode_varint(len as u64, buf);
660
661
136k
                for value in values {
662
131k
                    buf.$put(*value);
663
131k
                }
664
231k
            }
prost::encoding::sfixed32::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
649
231k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
231k
            where
651
231k
                B: BufMut,
652
            {
653
231k
                if values.is_empty() {
654
229k
                    return;
655
2.40k
                }
656
657
2.40k
                encode_key(tag, WireType::LengthDelimited, buf);
658
2.40k
                let len = values.len() as u64 * $width;
659
2.40k
                encode_varint(len as u64, buf);
660
661
100k
                for value in values {
662
97.7k
                    buf.$put(*value);
663
97.7k
                }
664
231k
            }
prost::encoding::sfixed64::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
649
231k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
231k
            where
651
231k
                B: BufMut,
652
            {
653
231k
                if values.is_empty() {
654
224k
                    return;
655
6.97k
                }
656
657
6.97k
                encode_key(tag, WireType::LengthDelimited, buf);
658
6.97k
                let len = values.len() as u64 * $width;
659
6.97k
                encode_varint(len as u64, buf);
660
661
86.2k
                for value in values {
662
79.3k
                    buf.$put(*value);
663
79.3k
                }
664
231k
            }
prost::encoding::fixed64::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
649
231k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
231k
            where
651
231k
                B: BufMut,
652
            {
653
231k
                if values.is_empty() {
654
229k
                    return;
655
1.72k
                }
656
657
1.72k
                encode_key(tag, WireType::LengthDelimited, buf);
658
1.72k
                let len = values.len() as u64 * $width;
659
1.72k
                encode_varint(len as u64, buf);
660
661
30.1k
                for value in values {
662
28.3k
                    buf.$put(*value);
663
28.3k
                }
664
231k
            }
prost::encoding::double::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
649
231k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
231k
            where
651
231k
                B: BufMut,
652
            {
653
231k
                if values.is_empty() {
654
212k
                    return;
655
18.6k
                }
656
657
18.6k
                encode_key(tag, WireType::LengthDelimited, buf);
658
18.6k
                let len = values.len() as u64 * $width;
659
18.6k
                encode_varint(len as u64, buf);
660
661
101k
                for value in values {
662
83.0k
                    buf.$put(*value);
663
83.0k
                }
664
231k
            }
prost::encoding::fixed32::encode_packed::<alloc::vec::Vec<u8>>
Line
Count
Source
649
231k
            pub fn encode_packed<B>(tag: u32, values: &[$ty], buf: &mut B)
650
231k
            where
651
231k
                B: BufMut,
652
            {
653
231k
                if values.is_empty() {
654
226k
                    return;
655
5.54k
                }
656
657
5.54k
                encode_key(tag, WireType::LengthDelimited, buf);
658
5.54k
                let len = values.len() as u64 * $width;
659
5.54k
                encode_varint(len as u64, buf);
660
661
22.2k
                for value in values {
662
16.6k
                    buf.$put(*value);
663
16.6k
                }
664
231k
            }
665
666
            merge_repeated_numeric!($ty, $wire_type, merge, merge_repeated);
667
668
            #[inline]
669
653k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
653k
                key_len(tag) + $width
671
653k
            }
prost::encoding::fixed64::encoded_len
Line
Count
Source
669
39.5k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
39.5k
                key_len(tag) + $width
671
39.5k
            }
prost::encoding::fixed32::encoded_len
Line
Count
Source
669
59.7k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
59.7k
                key_len(tag) + $width
671
59.7k
            }
prost::encoding::sfixed32::encoded_len
Line
Count
Source
669
51.6k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
51.6k
                key_len(tag) + $width
671
51.6k
            }
prost::encoding::float::encoded_len
Line
Count
Source
669
68.0k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
68.0k
                key_len(tag) + $width
671
68.0k
            }
prost::encoding::double::encoded_len
Line
Count
Source
669
51.8k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
51.8k
                key_len(tag) + $width
671
51.8k
            }
prost::encoding::sfixed64::encoded_len
Line
Count
Source
669
41.8k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
41.8k
                key_len(tag) + $width
671
41.8k
            }
prost::encoding::float::encoded_len
Line
Count
Source
669
815
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
815
                key_len(tag) + $width
671
815
            }
prost::encoding::double::encoded_len
Line
Count
Source
669
560
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
560
                key_len(tag) + $width
671
560
            }
Unexecuted instantiation: prost::encoding::fixed32::encoded_len
Unexecuted instantiation: prost::encoding::fixed64::encoded_len
Unexecuted instantiation: prost::encoding::sfixed32::encoded_len
Unexecuted instantiation: prost::encoding::sfixed64::encoded_len
prost::encoding::fixed64::encoded_len
Line
Count
Source
669
28.3k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
28.3k
                key_len(tag) + $width
671
28.3k
            }
prost::encoding::sfixed64::encoded_len
Line
Count
Source
669
81.0k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
81.0k
                key_len(tag) + $width
671
81.0k
            }
prost::encoding::fixed32::encoded_len
Line
Count
Source
669
119k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
119k
                key_len(tag) + $width
671
119k
            }
prost::encoding::float::encoded_len
Line
Count
Source
669
29.7k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
29.7k
                key_len(tag) + $width
671
29.7k
            }
prost::encoding::sfixed32::encoded_len
Line
Count
Source
669
57.5k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
57.5k
                key_len(tag) + $width
671
57.5k
            }
prost::encoding::double::encoded_len
Line
Count
Source
669
22.8k
            pub fn encoded_len(tag: u32, _: &$ty) -> usize {
670
22.8k
                key_len(tag) + $width
671
22.8k
            }
672
673
            #[inline]
674
18.2M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
18.2M
                (key_len(tag) + $width) * values.len()
676
18.2M
            }
prost::encoding::fixed64::encoded_len_repeated
Line
Count
Source
674
1.43M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
1.43M
                (key_len(tag) + $width) * values.len()
676
1.43M
            }
prost::encoding::fixed32::encoded_len_repeated
Line
Count
Source
674
1.43M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
1.43M
                (key_len(tag) + $width) * values.len()
676
1.43M
            }
prost::encoding::sfixed32::encoded_len_repeated
Line
Count
Source
674
1.43M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
1.43M
                (key_len(tag) + $width) * values.len()
676
1.43M
            }
prost::encoding::float::encoded_len_repeated
Line
Count
Source
674
1.43M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
1.43M
                (key_len(tag) + $width) * values.len()
676
1.43M
            }
prost::encoding::double::encoded_len_repeated
Line
Count
Source
674
1.43M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
1.43M
                (key_len(tag) + $width) * values.len()
676
1.43M
            }
prost::encoding::sfixed64::encoded_len_repeated
Line
Count
Source
674
1.43M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
1.43M
                (key_len(tag) + $width) * values.len()
676
1.43M
            }
Unexecuted instantiation: prost::encoding::float::encoded_len_repeated
Unexecuted instantiation: prost::encoding::double::encoded_len_repeated
Unexecuted instantiation: prost::encoding::fixed32::encoded_len_repeated
Unexecuted instantiation: prost::encoding::fixed64::encoded_len_repeated
Unexecuted instantiation: prost::encoding::sfixed32::encoded_len_repeated
Unexecuted instantiation: prost::encoding::sfixed64::encoded_len_repeated
prost::encoding::fixed64::encoded_len_repeated
Line
Count
Source
674
1.60M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
1.60M
                (key_len(tag) + $width) * values.len()
676
1.60M
            }
prost::encoding::sfixed64::encoded_len_repeated
Line
Count
Source
674
1.60M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
1.60M
                (key_len(tag) + $width) * values.len()
676
1.60M
            }
prost::encoding::fixed32::encoded_len_repeated
Line
Count
Source
674
1.60M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
1.60M
                (key_len(tag) + $width) * values.len()
676
1.60M
            }
prost::encoding::float::encoded_len_repeated
Line
Count
Source
674
1.60M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
1.60M
                (key_len(tag) + $width) * values.len()
676
1.60M
            }
prost::encoding::sfixed32::encoded_len_repeated
Line
Count
Source
674
1.60M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
1.60M
                (key_len(tag) + $width) * values.len()
676
1.60M
            }
prost::encoding::double::encoded_len_repeated
Line
Count
Source
674
1.60M
            pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
675
1.60M
                (key_len(tag) + $width) * values.len()
676
1.60M
            }
677
678
            #[inline]
679
21.9M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
21.9M
                if values.is_empty() {
681
21.7M
                    0
682
                } else {
683
222k
                    let len = $width * values.len();
684
222k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
21.9M
            }
prost::encoding::fixed64::encoded_len_packed
Line
Count
Source
679
2.86M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
2.86M
                if values.is_empty() {
681
2.82M
                    0
682
                } else {
683
35.2k
                    let len = $width * values.len();
684
35.2k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
2.86M
            }
prost::encoding::fixed32::encoded_len_packed
Line
Count
Source
679
2.86M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
2.86M
                if values.is_empty() {
681
2.85M
                    0
682
                } else {
683
8.45k
                    let len = $width * values.len();
684
8.45k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
2.86M
            }
prost::encoding::sfixed32::encoded_len_packed
Line
Count
Source
679
2.86M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
2.86M
                if values.is_empty() {
681
2.85M
                    0
682
                } else {
683
11.1k
                    let len = $width * values.len();
684
11.1k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
2.86M
            }
prost::encoding::float::encoded_len_packed
Line
Count
Source
679
2.86M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
2.86M
                if values.is_empty() {
681
2.84M
                    0
682
                } else {
683
14.8k
                    let len = $width * values.len();
684
14.8k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
2.86M
            }
prost::encoding::double::encoded_len_packed
Line
Count
Source
679
2.86M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
2.86M
                if values.is_empty() {
681
2.84M
                    0
682
                } else {
683
15.3k
                    let len = $width * values.len();
684
15.3k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
2.86M
            }
prost::encoding::sfixed64::encoded_len_packed
Line
Count
Source
679
2.86M
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
2.86M
                if values.is_empty() {
681
2.85M
                    0
682
                } else {
683
10.6k
                    let len = $width * values.len();
684
10.6k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
2.86M
            }
Unexecuted instantiation: prost::encoding::float::encoded_len_packed
Unexecuted instantiation: prost::encoding::double::encoded_len_packed
Unexecuted instantiation: prost::encoding::fixed32::encoded_len_packed
Unexecuted instantiation: prost::encoding::fixed64::encoded_len_packed
Unexecuted instantiation: prost::encoding::sfixed32::encoded_len_packed
Unexecuted instantiation: prost::encoding::sfixed64::encoded_len_packed
prost::encoding::fixed64::encoded_len_packed
Line
Count
Source
679
800k
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
800k
                if values.is_empty() {
681
795k
                    0
682
                } else {
683
4.98k
                    let len = $width * values.len();
684
4.98k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
800k
            }
prost::encoding::sfixed64::encoded_len_packed
Line
Count
Source
679
800k
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
800k
                if values.is_empty() {
681
778k
                    0
682
                } else {
683
22.8k
                    let len = $width * values.len();
684
22.8k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
800k
            }
prost::encoding::fixed32::encoded_len_packed
Line
Count
Source
679
800k
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
800k
                if values.is_empty() {
681
783k
                    0
682
                } else {
683
17.1k
                    let len = $width * values.len();
684
17.1k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
800k
            }
prost::encoding::float::encoded_len_packed
Line
Count
Source
679
800k
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
800k
                if values.is_empty() {
681
788k
                    0
682
                } else {
683
12.4k
                    let len = $width * values.len();
684
12.4k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
800k
            }
prost::encoding::sfixed32::encoded_len_packed
Line
Count
Source
679
800k
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
800k
                if values.is_empty() {
681
795k
                    0
682
                } else {
683
5.72k
                    let len = $width * values.len();
684
5.72k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
800k
            }
prost::encoding::double::encoded_len_packed
Line
Count
Source
679
800k
            pub fn encoded_len_packed(tag: u32, values: &[$ty]) -> usize {
680
800k
                if values.is_empty() {
681
737k
                    0
682
                } else {
683
63.6k
                    let len = $width * values.len();
684
63.6k
                    key_len(tag) + encoded_len_varint(len as u64) + len
685
                }
686
800k
            }
687
688
            #[cfg(test)]
689
            mod test {
690
                use proptest::prelude::*;
691
692
                use super::super::test::{check_collection_type, check_type};
693
                use super::*;
694
695
                proptest! {
696
                    #[test]
697
                    fn check(value: $ty, tag in MIN_TAG..=MAX_TAG) {
698
                        check_type(value, tag, $wire_type,
699
                                   encode, merge, encoded_len)?;
700
                    }
701
                    #[test]
702
                    fn check_repeated(value: Vec<$ty>, tag in MIN_TAG..=MAX_TAG) {
703
                        check_collection_type(value, tag, $wire_type,
704
                                              encode_repeated, merge_repeated,
705
                                              encoded_len_repeated)?;
706
                    }
707
                    #[test]
708
                    fn check_packed(value: Vec<$ty>, tag in MIN_TAG..=MAX_TAG) {
709
                        check_type(value, tag, WireType::LengthDelimited,
710
                                   encode_packed, merge_repeated,
711
                                   encoded_len_packed)?;
712
                    }
713
                }
714
            }
715
        }
716
    };
717
}
718
fixed_width!(
719
    f32,
720
    4,
721
    WireType::ThirtyTwoBit,
722
    float,
723
    put_f32_le,
724
    get_f32_le
725
);
726
fixed_width!(
727
    f64,
728
    8,
729
    WireType::SixtyFourBit,
730
    double,
731
    put_f64_le,
732
    get_f64_le
733
);
734
fixed_width!(
735
    u32,
736
    4,
737
    WireType::ThirtyTwoBit,
738
    fixed32,
739
    put_u32_le,
740
    get_u32_le
741
);
742
fixed_width!(
743
    u64,
744
    8,
745
    WireType::SixtyFourBit,
746
    fixed64,
747
    put_u64_le,
748
    get_u64_le
749
);
750
fixed_width!(
751
    i32,
752
    4,
753
    WireType::ThirtyTwoBit,
754
    sfixed32,
755
    put_i32_le,
756
    get_i32_le
757
);
758
fixed_width!(
759
    i64,
760
    8,
761
    WireType::SixtyFourBit,
762
    sfixed64,
763
    put_i64_le,
764
    get_i64_le
765
);
766
767
/// Macro which emits encoding functions for a length-delimited type.
768
macro_rules! length_delimited {
769
    ($ty:ty) => {
770
        encode_repeated!($ty);
771
772
490k
        pub fn merge_repeated<B>(
773
490k
            wire_type: WireType,
774
490k
            values: &mut Vec<$ty>,
775
490k
            buf: &mut B,
776
490k
            ctx: DecodeContext,
777
490k
        ) -> Result<(), DecodeError>
778
490k
        where
779
490k
            B: Buf,
780
        {
781
490k
            check_wire_type(WireType::LengthDelimited, wire_type)?;
782
490k
            let mut value = Default::default();
783
490k
            merge(wire_type, &mut value, buf, ctx)?;
784
490k
            values.push(value);
785
490k
            Ok(())
786
490k
        }
prost::encoding::bytes::merge_repeated::<&mut &[u8], alloc::vec::Vec<u8>>
Line
Count
Source
772
186k
        pub fn merge_repeated<B>(
773
186k
            wire_type: WireType,
774
186k
            values: &mut Vec<$ty>,
775
186k
            buf: &mut B,
776
186k
            ctx: DecodeContext,
777
186k
        ) -> Result<(), DecodeError>
778
186k
        where
779
186k
            B: Buf,
780
        {
781
186k
            check_wire_type(WireType::LengthDelimited, wire_type)?;
782
186k
            let mut value = Default::default();
783
186k
            merge(wire_type, &mut value, buf, ctx)?;
784
186k
            values.push(value);
785
186k
            Ok(())
786
186k
        }
prost::encoding::string::merge_repeated::<&mut &[u8]>
Line
Count
Source
772
61.1k
        pub fn merge_repeated<B>(
773
61.1k
            wire_type: WireType,
774
61.1k
            values: &mut Vec<$ty>,
775
61.1k
            buf: &mut B,
776
61.1k
            ctx: DecodeContext,
777
61.1k
        ) -> Result<(), DecodeError>
778
61.1k
        where
779
61.1k
            B: Buf,
780
        {
781
61.1k
            check_wire_type(WireType::LengthDelimited, wire_type)?;
782
61.1k
            let mut value = Default::default();
783
61.1k
            merge(wire_type, &mut value, buf, ctx)?;
784
61.1k
            values.push(value);
785
61.1k
            Ok(())
786
61.1k
        }
Unexecuted instantiation: prost::encoding::bytes::merge_repeated::<_, _>
Unexecuted instantiation: prost::encoding::string::merge_repeated::<_>
prost::encoding::string::merge_repeated::<&mut &[u8]>
Line
Count
Source
772
127k
        pub fn merge_repeated<B>(
773
127k
            wire_type: WireType,
774
127k
            values: &mut Vec<$ty>,
775
127k
            buf: &mut B,
776
127k
            ctx: DecodeContext,
777
127k
        ) -> Result<(), DecodeError>
778
127k
        where
779
127k
            B: Buf,
780
        {
781
127k
            check_wire_type(WireType::LengthDelimited, wire_type)?;
782
127k
            let mut value = Default::default();
783
127k
            merge(wire_type, &mut value, buf, ctx)?;
784
127k
            values.push(value);
785
127k
            Ok(())
786
127k
        }
prost::encoding::bytes::merge_repeated::<&mut &[u8], alloc::vec::Vec<u8>>
Line
Count
Source
772
115k
        pub fn merge_repeated<B>(
773
115k
            wire_type: WireType,
774
115k
            values: &mut Vec<$ty>,
775
115k
            buf: &mut B,
776
115k
            ctx: DecodeContext,
777
115k
        ) -> Result<(), DecodeError>
778
115k
        where
779
115k
            B: Buf,
780
        {
781
115k
            check_wire_type(WireType::LengthDelimited, wire_type)?;
782
115k
            let mut value = Default::default();
783
115k
            merge(wire_type, &mut value, buf, ctx)?;
784
115k
            values.push(value);
785
115k
            Ok(())
786
115k
        }
787
788
        #[inline]
789
1.00M
        pub fn encoded_len(tag: u32, value: &$ty) -> usize {
790
1.00M
            key_len(tag) + encoded_len_varint(value.len() as u64) + value.len()
791
1.00M
        }
prost::encoding::string::encoded_len
Line
Count
Source
789
497k
        pub fn encoded_len(tag: u32, value: &$ty) -> usize {
790
497k
            key_len(tag) + encoded_len_varint(value.len() as u64) + value.len()
791
497k
        }
prost::encoding::bytes::encoded_len::<alloc::vec::Vec<u8>>
Line
Count
Source
789
161k
        pub fn encoded_len(tag: u32, value: &$ty) -> usize {
790
161k
            key_len(tag) + encoded_len_varint(value.len() as u64) + value.len()
791
161k
        }
Unexecuted instantiation: prost::encoding::bytes::encoded_len::<bytes::bytes::Bytes>
prost::encoding::string::encoded_len
Line
Count
Source
789
2.14k
        pub fn encoded_len(tag: u32, value: &$ty) -> usize {
790
2.14k
            key_len(tag) + encoded_len_varint(value.len() as u64) + value.len()
791
2.14k
        }
prost::encoding::string::encoded_len
Line
Count
Source
789
342k
        pub fn encoded_len(tag: u32, value: &$ty) -> usize {
790
342k
            key_len(tag) + encoded_len_varint(value.len() as u64) + value.len()
791
342k
        }
792
793
        #[inline]
794
9.01M
        pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
795
9.01M
            key_len(tag) * values.len()
796
9.01M
                + values
797
9.01M
                    .iter()
798
9.01M
                    .map(|value| encoded_len_varint(value.len() as u64) + value.len())
prost::encoding::bytes::encoded_len_repeated::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
798
277k
                    .map(|value| encoded_len_varint(value.len() as u64) + value.len())
prost::encoding::string::encoded_len_repeated::{closure#0}
Line
Count
Source
798
126k
                    .map(|value| encoded_len_varint(value.len() as u64) + value.len())
Unexecuted instantiation: prost::encoding::bytes::encoded_len_repeated::<_>::{closure#0}
Unexecuted instantiation: prost::encoding::string::encoded_len_repeated::{closure#0}
prost::encoding::string::encoded_len_repeated::{closure#0}
Line
Count
Source
798
213k
                    .map(|value| encoded_len_varint(value.len() as u64) + value.len())
prost::encoding::bytes::encoded_len_repeated::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
798
188k
                    .map(|value| encoded_len_varint(value.len() as u64) + value.len())
799
9.01M
                    .sum::<usize>()
800
9.01M
        }
prost::encoding::bytes::encoded_len_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
794
1.43M
        pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
795
1.43M
            key_len(tag) * values.len()
796
1.43M
                + values
797
1.43M
                    .iter()
798
1.43M
                    .map(|value| encoded_len_varint(value.len() as u64) + value.len())
799
1.43M
                    .sum::<usize>()
800
1.43M
        }
prost::encoding::string::encoded_len_repeated
Line
Count
Source
794
4.38M
        pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
795
4.38M
            key_len(tag) * values.len()
796
4.38M
                + values
797
4.38M
                    .iter()
798
4.38M
                    .map(|value| encoded_len_varint(value.len() as u64) + value.len())
799
4.38M
                    .sum::<usize>()
800
4.38M
        }
Unexecuted instantiation: prost::encoding::bytes::encoded_len_repeated::<_>
Unexecuted instantiation: prost::encoding::string::encoded_len_repeated
prost::encoding::bytes::encoded_len_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
794
800k
        pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
795
800k
            key_len(tag) * values.len()
796
800k
                + values
797
800k
                    .iter()
798
800k
                    .map(|value| encoded_len_varint(value.len() as u64) + value.len())
799
800k
                    .sum::<usize>()
800
800k
        }
prost::encoding::string::encoded_len_repeated
Line
Count
Source
794
2.40M
        pub fn encoded_len_repeated(tag: u32, values: &[$ty]) -> usize {
795
2.40M
            key_len(tag) * values.len()
796
2.40M
                + values
797
2.40M
                    .iter()
798
2.40M
                    .map(|value| encoded_len_varint(value.len() as u64) + value.len())
799
2.40M
                    .sum::<usize>()
800
2.40M
        }
801
    };
802
}
803
804
pub mod string {
805
    use super::*;
806
807
426k
    pub fn encode<B>(tag: u32, value: &String, buf: &mut B)
808
426k
    where
809
426k
        B: BufMut,
810
    {
811
426k
        encode_key(tag, WireType::LengthDelimited, buf);
812
426k
        encode_varint(value.len() as u64, buf);
813
426k
        buf.put_slice(value.as_bytes());
814
426k
    }
prost::encoding::string::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
807
191k
    pub fn encode<B>(tag: u32, value: &String, buf: &mut B)
808
191k
    where
809
191k
        B: BufMut,
810
    {
811
191k
        encode_key(tag, WireType::LengthDelimited, buf);
812
191k
        encode_varint(value.len() as u64, buf);
813
191k
        buf.put_slice(value.as_bytes());
814
191k
    }
Unexecuted instantiation: prost::encoding::string::encode::<_>
prost::encoding::string::encode::<alloc::vec::Vec<u8>>
Line
Count
Source
807
235k
    pub fn encode<B>(tag: u32, value: &String, buf: &mut B)
808
235k
    where
809
235k
        B: BufMut,
810
    {
811
235k
        encode_key(tag, WireType::LengthDelimited, buf);
812
235k
        encode_varint(value.len() as u64, buf);
813
235k
        buf.put_slice(value.as_bytes());
814
235k
    }
815
2.29M
    pub fn merge<B>(
816
2.29M
        wire_type: WireType,
817
2.29M
        value: &mut String,
818
2.29M
        buf: &mut B,
819
2.29M
        ctx: DecodeContext,
820
2.29M
    ) -> Result<(), DecodeError>
821
2.29M
    where
822
2.29M
        B: Buf,
823
    {
824
        // ## Unsafety
825
        //
826
        // `string::merge` reuses `bytes::merge`, with an additional check of utf-8
827
        // well-formedness. If the utf-8 is not well-formed, or if any other error occurs, then the
828
        // string is cleared, so as to avoid leaking a string field with invalid data.
829
        //
830
        // This implementation uses the unsafe `String::as_mut_vec` method instead of the safe
831
        // alternative of temporarily swapping an empty `String` into the field, because it results
832
        // in up to 10% better performance on the protobuf message decoding benchmarks.
833
        //
834
        // It's required when using `String::as_mut_vec` that invalid utf-8 data not be leaked into
835
        // the backing `String`. To enforce this, even in the event of a panic in `bytes::merge` or
836
        // in the buf implementation, a drop guard is used.
837
        unsafe {
838
            struct DropGuard<'a>(&'a mut Vec<u8>);
839
            impl<'a> Drop for DropGuard<'a> {
840
                #[inline]
841
366
                fn drop(&mut self) {
842
366
                    self.0.clear();
843
366
                }
<prost::encoding::string::merge::DropGuard as core::ops::drop::Drop>::drop
Line
Count
Source
841
168
                fn drop(&mut self) {
842
168
                    self.0.clear();
843
168
                }
Unexecuted instantiation: <prost::encoding::string::merge::DropGuard as core::ops::drop::Drop>::drop
<prost::encoding::string::merge::DropGuard as core::ops::drop::Drop>::drop
Line
Count
Source
841
198
                fn drop(&mut self) {
842
198
                    self.0.clear();
843
198
                }
844
            }
845
846
2.29M
            let drop_guard = DropGuard(value.as_mut_vec());
847
2.29M
            bytes::merge(wire_type, drop_guard.0, buf, ctx)?;
848
2.29M
            match str::from_utf8(drop_guard.0) {
849
                Ok(_) => {
850
                    // Success; do not clear the bytes.
851
2.29M
                    mem::forget(drop_guard);
852
2.29M
                    Ok(())
853
                }
854
192
                Err(_) => Err(DecodeError::new(
855
192
                    "invalid string value: data is not UTF-8 encoded",
856
192
                )),
857
            }
858
        }
859
2.29M
    }
prost::encoding::string::merge::<&mut &[u8]>
Line
Count
Source
815
1.17M
    pub fn merge<B>(
816
1.17M
        wire_type: WireType,
817
1.17M
        value: &mut String,
818
1.17M
        buf: &mut B,
819
1.17M
        ctx: DecodeContext,
820
1.17M
    ) -> Result<(), DecodeError>
821
1.17M
    where
822
1.17M
        B: Buf,
823
    {
824
        // ## Unsafety
825
        //
826
        // `string::merge` reuses `bytes::merge`, with an additional check of utf-8
827
        // well-formedness. If the utf-8 is not well-formed, or if any other error occurs, then the
828
        // string is cleared, so as to avoid leaking a string field with invalid data.
829
        //
830
        // This implementation uses the unsafe `String::as_mut_vec` method instead of the safe
831
        // alternative of temporarily swapping an empty `String` into the field, because it results
832
        // in up to 10% better performance on the protobuf message decoding benchmarks.
833
        //
834
        // It's required when using `String::as_mut_vec` that invalid utf-8 data not be leaked into
835
        // the backing `String`. To enforce this, even in the event of a panic in `bytes::merge` or
836
        // in the buf implementation, a drop guard is used.
837
        unsafe {
838
            struct DropGuard<'a>(&'a mut Vec<u8>);
839
            impl<'a> Drop for DropGuard<'a> {
840
                #[inline]
841
                fn drop(&mut self) {
842
                    self.0.clear();
843
                }
844
            }
845
846
1.17M
            let drop_guard = DropGuard(value.as_mut_vec());
847
1.17M
            bytes::merge(wire_type, drop_guard.0, buf, ctx)?;
848
1.17M
            match str::from_utf8(drop_guard.0) {
849
                Ok(_) => {
850
                    // Success; do not clear the bytes.
851
1.17M
                    mem::forget(drop_guard);
852
1.17M
                    Ok(())
853
                }
854
97
                Err(_) => Err(DecodeError::new(
855
97
                    "invalid string value: data is not UTF-8 encoded",
856
97
                )),
857
            }
858
        }
859
1.17M
    }
Unexecuted instantiation: prost::encoding::string::merge::<_>
prost::encoding::string::merge::<&mut &[u8]>
Line
Count
Source
815
1.12M
    pub fn merge<B>(
816
1.12M
        wire_type: WireType,
817
1.12M
        value: &mut String,
818
1.12M
        buf: &mut B,
819
1.12M
        ctx: DecodeContext,
820
1.12M
    ) -> Result<(), DecodeError>
821
1.12M
    where
822
1.12M
        B: Buf,
823
    {
824
        // ## Unsafety
825
        //
826
        // `string::merge` reuses `bytes::merge`, with an additional check of utf-8
827
        // well-formedness. If the utf-8 is not well-formed, or if any other error occurs, then the
828
        // string is cleared, so as to avoid leaking a string field with invalid data.
829
        //
830
        // This implementation uses the unsafe `String::as_mut_vec` method instead of the safe
831
        // alternative of temporarily swapping an empty `String` into the field, because it results
832
        // in up to 10% better performance on the protobuf message decoding benchmarks.
833
        //
834
        // It's required when using `String::as_mut_vec` that invalid utf-8 data not be leaked into
835
        // the backing `String`. To enforce this, even in the event of a panic in `bytes::merge` or
836
        // in the buf implementation, a drop guard is used.
837
        unsafe {
838
            struct DropGuard<'a>(&'a mut Vec<u8>);
839
            impl<'a> Drop for DropGuard<'a> {
840
                #[inline]
841
                fn drop(&mut self) {
842
                    self.0.clear();
843
                }
844
            }
845
846
1.12M
            let drop_guard = DropGuard(value.as_mut_vec());
847
1.12M
            bytes::merge(wire_type, drop_guard.0, buf, ctx)?;
848
1.12M
            match str::from_utf8(drop_guard.0) {
849
                Ok(_) => {
850
                    // Success; do not clear the bytes.
851
1.12M
                    mem::forget(drop_guard);
852
1.12M
                    Ok(())
853
                }
854
95
                Err(_) => Err(DecodeError::new(
855
95
                    "invalid string value: data is not UTF-8 encoded",
856
95
                )),
857
            }
858
        }
859
1.12M
    }
860
861
    length_delimited!(String);
862
863
    #[cfg(test)]
864
    mod test {
865
        use proptest::prelude::*;
866
867
        use super::super::test::{check_collection_type, check_type};
868
        use super::*;
869
870
        proptest! {
871
            #[test]
872
            fn check(value: String, tag in MIN_TAG..=MAX_TAG) {
873
                super::test::check_type(value, tag, WireType::LengthDelimited,
874
                                        encode, merge, encoded_len)?;
875
            }
876
            #[test]
877
            fn check_repeated(value: Vec<String>, tag in MIN_TAG..=MAX_TAG) {
878
                super::test::check_collection_type(value, tag, WireType::LengthDelimited,
879
                                                   encode_repeated, merge_repeated,
880
                                                   encoded_len_repeated)?;
881
            }
882
        }
883
    }
884
}
885
886
pub trait BytesAdapter: sealed::BytesAdapter {}
887
888
mod sealed {
889
    use super::{Buf, BufMut};
890
891
    pub trait BytesAdapter: Default + Sized + 'static {
892
        fn len(&self) -> usize;
893
894
        /// Replace contents of this buffer with the contents of another buffer.
895
        fn replace_with<B>(&mut self, buf: B)
896
        where
897
            B: Buf;
898
899
        /// Appends this buffer to the (contents of) other buffer.
900
        fn append_to<B>(&self, buf: &mut B)
901
        where
902
            B: BufMut;
903
904
0
        fn is_empty(&self) -> bool {
905
0
            self.len() == 0
906
0
        }
907
    }
908
}
909
910
impl BytesAdapter for Bytes {}
911
912
impl sealed::BytesAdapter for Bytes {
913
0
    fn len(&self) -> usize {
914
0
        Buf::remaining(self)
915
0
    }
916
917
0
    fn replace_with<B>(&mut self, mut buf: B)
918
0
    where
919
0
        B: Buf,
920
    {
921
0
        *self = buf.copy_to_bytes(buf.remaining());
922
0
    }
923
924
0
    fn append_to<B>(&self, buf: &mut B)
925
0
    where
926
0
        B: BufMut,
927
    {
928
0
        buf.put(self.clone())
929
0
    }
930
}
931
932
impl BytesAdapter for Vec<u8> {}
933
934
impl sealed::BytesAdapter for Vec<u8> {
935
1.60M
    fn len(&self) -> usize {
936
1.60M
        Vec::len(self)
937
1.60M
    }
938
939
2.67M
    fn replace_with<B>(&mut self, buf: B)
940
2.67M
    where
941
2.67M
        B: Buf,
942
    {
943
2.67M
        self.clear();
944
2.67M
        self.reserve(buf.remaining());
945
2.67M
        self.put(buf);
946
2.67M
    }
<alloc::vec::Vec<u8> as prost::encoding::sealed::BytesAdapter>::replace_with::<bytes::bytes::Bytes>
Line
Count
Source
939
1.41M
    fn replace_with<B>(&mut self, buf: B)
940
1.41M
    where
941
1.41M
        B: Buf,
942
    {
943
1.41M
        self.clear();
944
1.41M
        self.reserve(buf.remaining());
945
1.41M
        self.put(buf);
946
1.41M
    }
Unexecuted instantiation: <alloc::vec::Vec<u8> as prost::encoding::sealed::BytesAdapter>::replace_with::<_>
<alloc::vec::Vec<u8> as prost::encoding::sealed::BytesAdapter>::replace_with::<bytes::bytes::Bytes>
Line
Count
Source
939
1.26M
    fn replace_with<B>(&mut self, buf: B)
940
1.26M
    where
941
1.26M
        B: Buf,
942
    {
943
1.26M
        self.clear();
944
1.26M
        self.reserve(buf.remaining());
945
1.26M
        self.put(buf);
946
1.26M
    }
947
948
347k
    fn append_to<B>(&self, buf: &mut B)
949
347k
    where
950
347k
        B: BufMut,
951
    {
952
347k
        buf.put(self.as_slice())
953
347k
    }
<alloc::vec::Vec<u8> as prost::encoding::sealed::BytesAdapter>::append_to::<alloc::vec::Vec<u8>>
Line
Count
Source
948
218k
    fn append_to<B>(&self, buf: &mut B)
949
218k
    where
950
218k
        B: BufMut,
951
    {
952
218k
        buf.put(self.as_slice())
953
218k
    }
Unexecuted instantiation: <alloc::vec::Vec<u8> as prost::encoding::sealed::BytesAdapter>::append_to::<_>
<alloc::vec::Vec<u8> as prost::encoding::sealed::BytesAdapter>::append_to::<alloc::vec::Vec<u8>>
Line
Count
Source
948
129k
    fn append_to<B>(&self, buf: &mut B)
949
129k
    where
950
129k
        B: BufMut,
951
    {
952
129k
        buf.put(self.as_slice())
953
129k
    }
954
}
955
956
pub mod bytes {
957
    use super::*;
958
959
347k
    pub fn encode<A, B>(tag: u32, value: &A, buf: &mut B)
960
347k
    where
961
347k
        A: BytesAdapter,
962
347k
        B: BufMut,
963
    {
964
347k
        encode_key(tag, WireType::LengthDelimited, buf);
965
347k
        encode_varint(value.len() as u64, buf);
966
347k
        value.append_to(buf);
967
347k
    }
prost::encoding::bytes::encode::<alloc::vec::Vec<u8>, alloc::vec::Vec<u8>>
Line
Count
Source
959
218k
    pub fn encode<A, B>(tag: u32, value: &A, buf: &mut B)
960
218k
    where
961
218k
        A: BytesAdapter,
962
218k
        B: BufMut,
963
    {
964
218k
        encode_key(tag, WireType::LengthDelimited, buf);
965
218k
        encode_varint(value.len() as u64, buf);
966
218k
        value.append_to(buf);
967
218k
    }
Unexecuted instantiation: prost::encoding::bytes::encode::<_, _>
prost::encoding::bytes::encode::<alloc::vec::Vec<u8>, alloc::vec::Vec<u8>>
Line
Count
Source
959
129k
    pub fn encode<A, B>(tag: u32, value: &A, buf: &mut B)
960
129k
    where
961
129k
        A: BytesAdapter,
962
129k
        B: BufMut,
963
    {
964
129k
        encode_key(tag, WireType::LengthDelimited, buf);
965
129k
        encode_varint(value.len() as u64, buf);
966
129k
        value.append_to(buf);
967
129k
    }
968
969
2.67M
    pub fn merge<A, B>(
970
2.67M
        wire_type: WireType,
971
2.67M
        value: &mut A,
972
2.67M
        buf: &mut B,
973
2.67M
        _ctx: DecodeContext,
974
2.67M
    ) -> Result<(), DecodeError>
975
2.67M
    where
976
2.67M
        A: BytesAdapter,
977
2.67M
        B: Buf,
978
    {
979
2.67M
        check_wire_type(WireType::LengthDelimited, wire_type)?;
980
2.67M
        let len = decode_varint(buf)?;
981
2.67M
        if len > buf.remaining() as u64 {
982
232
            return Err(DecodeError::new("buffer underflow"));
983
2.67M
        }
984
2.67M
        let len = len as usize;
985
986
        // Clear the existing value. This follows from the following rule in the encoding guide[1]:
987
        //
988
        // > Normally, an encoded message would never have more than one instance of a non-repeated
989
        // > field. However, parsers are expected to handle the case in which they do. For numeric
990
        // > types and strings, if the same field appears multiple times, the parser accepts the
991
        // > last value it sees.
992
        //
993
        // [1]: https://developers.google.com/protocol-buffers/docs/encoding#optional
994
2.67M
        value.replace_with(buf.copy_to_bytes(len));
995
2.67M
        Ok(())
996
2.67M
    }
prost::encoding::bytes::merge::<alloc::vec::Vec<u8>, &mut &[u8]>
Line
Count
Source
969
1.41M
    pub fn merge<A, B>(
970
1.41M
        wire_type: WireType,
971
1.41M
        value: &mut A,
972
1.41M
        buf: &mut B,
973
1.41M
        _ctx: DecodeContext,
974
1.41M
    ) -> Result<(), DecodeError>
975
1.41M
    where
976
1.41M
        A: BytesAdapter,
977
1.41M
        B: Buf,
978
    {
979
1.41M
        check_wire_type(WireType::LengthDelimited, wire_type)?;
980
1.41M
        let len = decode_varint(buf)?;
981
1.41M
        if len > buf.remaining() as u64 {
982
111
            return Err(DecodeError::new("buffer underflow"));
983
1.41M
        }
984
1.41M
        let len = len as usize;
985
986
        // Clear the existing value. This follows from the following rule in the encoding guide[1]:
987
        //
988
        // > Normally, an encoded message would never have more than one instance of a non-repeated
989
        // > field. However, parsers are expected to handle the case in which they do. For numeric
990
        // > types and strings, if the same field appears multiple times, the parser accepts the
991
        // > last value it sees.
992
        //
993
        // [1]: https://developers.google.com/protocol-buffers/docs/encoding#optional
994
1.41M
        value.replace_with(buf.copy_to_bytes(len));
995
1.41M
        Ok(())
996
1.41M
    }
Unexecuted instantiation: prost::encoding::bytes::merge::<_, _>
prost::encoding::bytes::merge::<alloc::vec::Vec<u8>, &mut &[u8]>
Line
Count
Source
969
1.26M
    pub fn merge<A, B>(
970
1.26M
        wire_type: WireType,
971
1.26M
        value: &mut A,
972
1.26M
        buf: &mut B,
973
1.26M
        _ctx: DecodeContext,
974
1.26M
    ) -> Result<(), DecodeError>
975
1.26M
    where
976
1.26M
        A: BytesAdapter,
977
1.26M
        B: Buf,
978
    {
979
1.26M
        check_wire_type(WireType::LengthDelimited, wire_type)?;
980
1.26M
        let len = decode_varint(buf)?;
981
1.26M
        if len > buf.remaining() as u64 {
982
121
            return Err(DecodeError::new("buffer underflow"));
983
1.26M
        }
984
1.26M
        let len = len as usize;
985
986
        // Clear the existing value. This follows from the following rule in the encoding guide[1]:
987
        //
988
        // > Normally, an encoded message would never have more than one instance of a non-repeated
989
        // > field. However, parsers are expected to handle the case in which they do. For numeric
990
        // > types and strings, if the same field appears multiple times, the parser accepts the
991
        // > last value it sees.
992
        //
993
        // [1]: https://developers.google.com/protocol-buffers/docs/encoding#optional
994
1.26M
        value.replace_with(buf.copy_to_bytes(len));
995
1.26M
        Ok(())
996
1.26M
    }
997
998
    length_delimited!(impl BytesAdapter);
999
1000
    #[cfg(test)]
1001
    mod test {
1002
        use proptest::prelude::*;
1003
1004
        use super::super::test::{check_collection_type, check_type};
1005
        use super::*;
1006
1007
        proptest! {
1008
            #[test]
1009
            fn check_vec(value: Vec<u8>, tag in MIN_TAG..=MAX_TAG) {
1010
                super::test::check_type::<Vec<u8>, Vec<u8>>(value, tag, WireType::LengthDelimited,
1011
                                                            encode, merge, encoded_len)?;
1012
            }
1013
1014
            #[test]
1015
            fn check_bytes(value: Vec<u8>, tag in MIN_TAG..=MAX_TAG) {
1016
                let value = Bytes::from(value);
1017
                super::test::check_type::<Bytes, Bytes>(value, tag, WireType::LengthDelimited,
1018
                                                        encode, merge, encoded_len)?;
1019
            }
1020
1021
            #[test]
1022
            fn check_repeated_vec(value: Vec<Vec<u8>>, tag in MIN_TAG..=MAX_TAG) {
1023
                super::test::check_collection_type(value, tag, WireType::LengthDelimited,
1024
                                                   encode_repeated, merge_repeated,
1025
                                                   encoded_len_repeated)?;
1026
            }
1027
1028
            #[test]
1029
            fn check_repeated_bytes(value: Vec<Vec<u8>>, tag in MIN_TAG..=MAX_TAG) {
1030
                let value = value.into_iter().map(Bytes::from).collect();
1031
                super::test::check_collection_type(value, tag, WireType::LengthDelimited,
1032
                                                   encode_repeated, merge_repeated,
1033
                                                   encoded_len_repeated)?;
1034
            }
1035
        }
1036
    }
1037
}
1038
1039
pub mod message {
1040
    use super::*;
1041
1042
2.06M
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
2.06M
    where
1044
2.06M
        M: Message,
1045
2.06M
        B: BufMut,
1046
    {
1047
2.06M
        encode_key(tag, WireType::LengthDelimited, buf);
1048
2.06M
        encode_varint(msg.encoded_len() as u64, buf);
1049
2.06M
        msg.encode_raw(buf);
1050
2.06M
    }
prost::encoding::message::encode::<alloc::vec::Vec<u8>, alloc::vec::Vec<u8>>
Line
Count
Source
1042
43.6k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
43.6k
    where
1044
43.6k
        M: Message,
1045
43.6k
        B: BufMut,
1046
    {
1047
43.6k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
43.6k
        encode_varint(msg.encoded_len() as u64, buf);
1049
43.6k
        msg.encode_raw(buf);
1050
43.6k
    }
prost::encoding::message::encode::<alloc::boxed::Box<protobuf::test_messages::proto3::TestAllTypesProto3>, alloc::vec::Vec<u8>>
Line
Count
Source
1042
358k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
358k
    where
1044
358k
        M: Message,
1045
358k
        B: BufMut,
1046
    {
1047
358k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
358k
        encode_varint(msg.encoded_len() as u64, buf);
1049
358k
        msg.encode_raw(buf);
1050
358k
    }
prost::encoding::message::encode::<alloc::boxed::Box<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>, alloc::vec::Vec<u8>>
Line
Count
Source
1042
45.4k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
45.4k
    where
1044
45.4k
        M: Message,
1045
45.4k
        B: BufMut,
1046
    {
1047
45.4k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
45.4k
        encode_varint(msg.encoded_len() as u64, buf);
1049
45.4k
        msg.encode_raw(buf);
1050
45.4k
    }
prost::encoding::message::encode::<prost_types::Any, alloc::vec::Vec<u8>>
Line
Count
Source
1042
53.4k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
53.4k
    where
1044
53.4k
        M: Message,
1045
53.4k
        B: BufMut,
1046
    {
1047
53.4k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
53.4k
        encode_varint(msg.encoded_len() as u64, buf);
1049
53.4k
        msg.encode_raw(buf);
1050
53.4k
    }
prost::encoding::message::encode::<prost_types::Value, alloc::vec::Vec<u8>>
Line
Count
Source
1042
192k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
192k
    where
1044
192k
        M: Message,
1045
192k
        B: BufMut,
1046
    {
1047
192k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
192k
        encode_varint(msg.encoded_len() as u64, buf);
1049
192k
        msg.encode_raw(buf);
1050
192k
    }
prost::encoding::message::encode::<prost_types::Struct, alloc::vec::Vec<u8>>
Line
Count
Source
1042
109k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
109k
    where
1044
109k
        M: Message,
1045
109k
        B: BufMut,
1046
    {
1047
109k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
109k
        encode_varint(msg.encoded_len() as u64, buf);
1049
109k
        msg.encode_raw(buf);
1050
109k
    }
prost::encoding::message::encode::<prost_types::Duration, alloc::vec::Vec<u8>>
Line
Count
Source
1042
65.1k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
65.1k
    where
1044
65.1k
        M: Message,
1045
65.1k
        B: BufMut,
1046
    {
1047
65.1k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
65.1k
        encode_varint(msg.encoded_len() as u64, buf);
1049
65.1k
        msg.encode_raw(buf);
1050
65.1k
    }
prost::encoding::message::encode::<prost_types::FieldMask, alloc::vec::Vec<u8>>
Line
Count
Source
1042
30.5k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
30.5k
    where
1044
30.5k
        M: Message,
1045
30.5k
        B: BufMut,
1046
    {
1047
30.5k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
30.5k
        encode_varint(msg.encoded_len() as u64, buf);
1049
30.5k
        msg.encode_raw(buf);
1050
30.5k
    }
prost::encoding::message::encode::<prost_types::ListValue, alloc::vec::Vec<u8>>
Line
Count
Source
1042
95.1k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
95.1k
    where
1044
95.1k
        M: Message,
1045
95.1k
        B: BufMut,
1046
    {
1047
95.1k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
95.1k
        encode_varint(msg.encoded_len() as u64, buf);
1049
95.1k
        msg.encode_raw(buf);
1050
95.1k
    }
prost::encoding::message::encode::<prost_types::Timestamp, alloc::vec::Vec<u8>>
Line
Count
Source
1042
44.6k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
44.6k
    where
1044
44.6k
        M: Message,
1045
44.6k
        B: BufMut,
1046
    {
1047
44.6k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
44.6k
        encode_varint(msg.encoded_len() as u64, buf);
1049
44.6k
        msg.encode_raw(buf);
1050
44.6k
    }
prost::encoding::message::encode::<alloc::string::String, alloc::vec::Vec<u8>>
Line
Count
Source
1042
31.6k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
31.6k
    where
1044
31.6k
        M: Message,
1045
31.6k
        B: BufMut,
1046
    {
1047
31.6k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
31.6k
        encode_varint(msg.encoded_len() as u64, buf);
1049
31.6k
        msg.encode_raw(buf);
1050
31.6k
    }
prost::encoding::message::encode::<protobuf::test_messages::proto3::ForeignMessage, alloc::vec::Vec<u8>>
Line
Count
Source
1042
23.8k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
23.8k
    where
1044
23.8k
        M: Message,
1045
23.8k
        B: BufMut,
1046
    {
1047
23.8k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
23.8k
        encode_varint(msg.encoded_len() as u64, buf);
1049
23.8k
        msg.encode_raw(buf);
1050
23.8k
    }
prost::encoding::message::encode::<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, alloc::vec::Vec<u8>>
Line
Count
Source
1042
276k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
276k
    where
1044
276k
        M: Message,
1045
276k
        B: BufMut,
1046
    {
1047
276k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
276k
        encode_varint(msg.encoded_len() as u64, buf);
1049
276k
        msg.encode_raw(buf);
1050
276k
    }
prost::encoding::message::encode::<bool, alloc::vec::Vec<u8>>
Line
Count
Source
1042
17.7k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
17.7k
    where
1044
17.7k
        M: Message,
1045
17.7k
        B: BufMut,
1046
    {
1047
17.7k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
17.7k
        encode_varint(msg.encoded_len() as u64, buf);
1049
17.7k
        msg.encode_raw(buf);
1050
17.7k
    }
prost::encoding::message::encode::<f64, alloc::vec::Vec<u8>>
Line
Count
Source
1042
15.2k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
15.2k
    where
1044
15.2k
        M: Message,
1045
15.2k
        B: BufMut,
1046
    {
1047
15.2k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
15.2k
        encode_varint(msg.encoded_len() as u64, buf);
1049
15.2k
        msg.encode_raw(buf);
1050
15.2k
    }
prost::encoding::message::encode::<f32, alloc::vec::Vec<u8>>
Line
Count
Source
1042
87.9k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
87.9k
    where
1044
87.9k
        M: Message,
1045
87.9k
        B: BufMut,
1046
    {
1047
87.9k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
87.9k
        encode_varint(msg.encoded_len() as u64, buf);
1049
87.9k
        msg.encode_raw(buf);
1050
87.9k
    }
prost::encoding::message::encode::<i32, alloc::vec::Vec<u8>>
Line
Count
Source
1042
30.6k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
30.6k
    where
1044
30.6k
        M: Message,
1045
30.6k
        B: BufMut,
1046
    {
1047
30.6k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
30.6k
        encode_varint(msg.encoded_len() as u64, buf);
1049
30.6k
        msg.encode_raw(buf);
1050
30.6k
    }
prost::encoding::message::encode::<u32, alloc::vec::Vec<u8>>
Line
Count
Source
1042
6.45k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
6.45k
    where
1044
6.45k
        M: Message,
1045
6.45k
        B: BufMut,
1046
    {
1047
6.45k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
6.45k
        encode_varint(msg.encoded_len() as u64, buf);
1049
6.45k
        msg.encode_raw(buf);
1050
6.45k
    }
prost::encoding::message::encode::<i64, alloc::vec::Vec<u8>>
Line
Count
Source
1042
49.7k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
49.7k
    where
1044
49.7k
        M: Message,
1045
49.7k
        B: BufMut,
1046
    {
1047
49.7k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
49.7k
        encode_varint(msg.encoded_len() as u64, buf);
1049
49.7k
        msg.encode_raw(buf);
1050
49.7k
    }
prost::encoding::message::encode::<u64, alloc::vec::Vec<u8>>
Line
Count
Source
1042
68.5k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
68.5k
    where
1044
68.5k
        M: Message,
1045
68.5k
        B: BufMut,
1046
    {
1047
68.5k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
68.5k
        encode_varint(msg.encoded_len() as u64, buf);
1049
68.5k
        msg.encode_raw(buf);
1050
68.5k
    }
Unexecuted instantiation: prost::encoding::message::encode::<_, _>
prost::encoding::message::encode::<alloc::boxed::Box<protobuf::test_messages::proto2::TestAllTypesProto2>, alloc::vec::Vec<u8>>
Line
Count
Source
1042
203k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
203k
    where
1044
203k
        M: Message,
1045
203k
        B: BufMut,
1046
    {
1047
203k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
203k
        encode_varint(msg.encoded_len() as u64, buf);
1049
203k
        msg.encode_raw(buf);
1050
203k
    }
prost::encoding::message::encode::<alloc::boxed::Box<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>, alloc::vec::Vec<u8>>
Line
Count
Source
1042
11.2k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
11.2k
    where
1044
11.2k
        M: Message,
1045
11.2k
        B: BufMut,
1046
    {
1047
11.2k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
11.2k
        encode_varint(msg.encoded_len() as u64, buf);
1049
11.2k
        msg.encode_raw(buf);
1050
11.2k
    }
prost::encoding::message::encode::<protobuf::test_messages::proto2::ForeignMessageProto2, alloc::vec::Vec<u8>>
Line
Count
Source
1042
20.0k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
20.0k
    where
1044
20.0k
        M: Message,
1045
20.0k
        B: BufMut,
1046
    {
1047
20.0k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
20.0k
        encode_varint(msg.encoded_len() as u64, buf);
1049
20.0k
        msg.encode_raw(buf);
1050
20.0k
    }
prost::encoding::message::encode::<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, alloc::vec::Vec<u8>>
Line
Count
Source
1042
184k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1043
184k
    where
1044
184k
        M: Message,
1045
184k
        B: BufMut,
1046
    {
1047
184k
        encode_key(tag, WireType::LengthDelimited, buf);
1048
184k
        encode_varint(msg.encoded_len() as u64, buf);
1049
184k
        msg.encode_raw(buf);
1050
184k
    }
1051
1052
2.42M
    pub fn merge<M, B>(
1053
2.42M
        wire_type: WireType,
1054
2.42M
        msg: &mut M,
1055
2.42M
        buf: &mut B,
1056
2.42M
        ctx: DecodeContext,
1057
2.42M
    ) -> Result<(), DecodeError>
1058
2.42M
    where
1059
2.42M
        M: Message,
1060
2.42M
        B: Buf,
1061
    {
1062
2.42M
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
2.42M
        ctx.limit_reached()?;
1064
2.42M
        merge_loop(
1065
2.42M
            msg,
1066
2.42M
            buf,
1067
2.42M
            ctx.enter_recursion(),
1068
9.63M
            |msg: &mut M, buf: &mut B, ctx| {
1069
9.63M
                let (tag, wire_type) = decode_key(buf)?;
1070
9.63M
                msg.merge_field(tag, wire_type, buf, ctx)
1071
9.63M
            },
prost::encoding::message::merge::<alloc::vec::Vec<u8>, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
5.20k
            |msg: &mut M, buf: &mut B, ctx| {
1069
5.20k
                let (tag, wire_type) = decode_key(buf)?;
1070
5.19k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
5.20k
            },
prost::encoding::message::merge::<alloc::boxed::Box<protobuf::test_messages::proto3::TestAllTypesProto3>, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
4.68M
            |msg: &mut M, buf: &mut B, ctx| {
1069
4.68M
                let (tag, wire_type) = decode_key(buf)?;
1070
4.68M
                msg.merge_field(tag, wire_type, buf, ctx)
1071
4.68M
            },
prost::encoding::message::merge::<alloc::boxed::Box<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
49.3k
            |msg: &mut M, buf: &mut B, ctx| {
1069
49.3k
                let (tag, wire_type) = decode_key(buf)?;
1070
49.3k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
49.3k
            },
prost::encoding::message::merge::<prost_types::Any, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
20.6k
            |msg: &mut M, buf: &mut B, ctx| {
1069
20.6k
                let (tag, wire_type) = decode_key(buf)?;
1070
20.6k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
20.6k
            },
prost::encoding::message::merge::<prost_types::Value, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
202k
            |msg: &mut M, buf: &mut B, ctx| {
1069
202k
                let (tag, wire_type) = decode_key(buf)?;
1070
202k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
202k
            },
prost::encoding::message::merge::<prost_types::Struct, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
219k
            |msg: &mut M, buf: &mut B, ctx| {
1069
219k
                let (tag, wire_type) = decode_key(buf)?;
1070
219k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
219k
            },
prost::encoding::message::merge::<prost_types::Duration, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
159k
            |msg: &mut M, buf: &mut B, ctx| {
1069
159k
                let (tag, wire_type) = decode_key(buf)?;
1070
159k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
159k
            },
prost::encoding::message::merge::<prost_types::FieldMask, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
23.2k
            |msg: &mut M, buf: &mut B, ctx| {
1069
23.2k
                let (tag, wire_type) = decode_key(buf)?;
1070
23.2k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
23.2k
            },
prost::encoding::message::merge::<prost_types::ListValue, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
156k
            |msg: &mut M, buf: &mut B, ctx| {
1069
156k
                let (tag, wire_type) = decode_key(buf)?;
1070
156k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
156k
            },
prost::encoding::message::merge::<prost_types::Timestamp, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
4.92k
            |msg: &mut M, buf: &mut B, ctx| {
1069
4.92k
                let (tag, wire_type) = decode_key(buf)?;
1070
4.92k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
4.92k
            },
prost::encoding::message::merge::<alloc::string::String, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
1.75k
            |msg: &mut M, buf: &mut B, ctx| {
1069
1.75k
                let (tag, wire_type) = decode_key(buf)?;
1070
1.73k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
1.75k
            },
prost::encoding::message::merge::<protobuf::test_messages::proto3::ForeignMessage, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
22.4k
            |msg: &mut M, buf: &mut B, ctx| {
1069
22.4k
                let (tag, wire_type) = decode_key(buf)?;
1070
22.4k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
22.4k
            },
prost::encoding::message::merge::<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
313k
            |msg: &mut M, buf: &mut B, ctx| {
1069
313k
                let (tag, wire_type) = decode_key(buf)?;
1070
313k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
313k
            },
prost::encoding::message::merge::<bool, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
14.9k
            |msg: &mut M, buf: &mut B, ctx| {
1069
14.9k
                let (tag, wire_type) = decode_key(buf)?;
1070
14.9k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
14.9k
            },
prost::encoding::message::merge::<f64, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
533
            |msg: &mut M, buf: &mut B, ctx| {
1069
533
                let (tag, wire_type) = decode_key(buf)?;
1070
518
                msg.merge_field(tag, wire_type, buf, ctx)
1071
533
            },
prost::encoding::message::merge::<f32, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
751
            |msg: &mut M, buf: &mut B, ctx| {
1069
751
                let (tag, wire_type) = decode_key(buf)?;
1070
734
                msg.merge_field(tag, wire_type, buf, ctx)
1071
751
            },
prost::encoding::message::merge::<i32, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
35.9k
            |msg: &mut M, buf: &mut B, ctx| {
1069
35.9k
                let (tag, wire_type) = decode_key(buf)?;
1070
35.9k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
35.9k
            },
prost::encoding::message::merge::<u32, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
5.28k
            |msg: &mut M, buf: &mut B, ctx| {
1069
5.28k
                let (tag, wire_type) = decode_key(buf)?;
1070
5.27k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
5.28k
            },
prost::encoding::message::merge::<i64, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
2.59k
            |msg: &mut M, buf: &mut B, ctx| {
1069
2.59k
                let (tag, wire_type) = decode_key(buf)?;
1070
2.57k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
2.59k
            },
prost::encoding::message::merge::<u64, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
3.16k
            |msg: &mut M, buf: &mut B, ctx| {
1069
3.16k
                let (tag, wire_type) = decode_key(buf)?;
1070
3.16k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
3.16k
            },
Unexecuted instantiation: prost::encoding::message::merge::<_, _>::{closure#0}
prost::encoding::message::merge::<alloc::boxed::Box<protobuf::test_messages::proto2::TestAllTypesProto2>, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
3.46M
            |msg: &mut M, buf: &mut B, ctx| {
1069
3.46M
                let (tag, wire_type) = decode_key(buf)?;
1070
3.46M
                msg.merge_field(tag, wire_type, buf, ctx)
1071
3.46M
            },
prost::encoding::message::merge::<alloc::boxed::Box<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
12.0k
            |msg: &mut M, buf: &mut B, ctx| {
1069
12.0k
                let (tag, wire_type) = decode_key(buf)?;
1070
12.0k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
12.0k
            },
prost::encoding::message::merge::<protobuf::test_messages::proto2::ForeignMessageProto2, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
21.6k
            |msg: &mut M, buf: &mut B, ctx| {
1069
21.6k
                let (tag, wire_type) = decode_key(buf)?;
1070
21.6k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
21.6k
            },
prost::encoding::message::merge::<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, &mut &[u8]>::{closure#0}
Line
Count
Source
1068
207k
            |msg: &mut M, buf: &mut B, ctx| {
1069
207k
                let (tag, wire_type) = decode_key(buf)?;
1070
207k
                msg.merge_field(tag, wire_type, buf, ctx)
1071
207k
            },
1072
        )
1073
2.42M
    }
prost::encoding::message::merge::<alloc::vec::Vec<u8>, &mut &[u8]>
Line
Count
Source
1052
51.1k
    pub fn merge<M, B>(
1053
51.1k
        wire_type: WireType,
1054
51.1k
        msg: &mut M,
1055
51.1k
        buf: &mut B,
1056
51.1k
        ctx: DecodeContext,
1057
51.1k
    ) -> Result<(), DecodeError>
1058
51.1k
    where
1059
51.1k
        M: Message,
1060
51.1k
        B: Buf,
1061
    {
1062
51.1k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
51.1k
        ctx.limit_reached()?;
1064
51.1k
        merge_loop(
1065
51.1k
            msg,
1066
51.1k
            buf,
1067
51.1k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
51.1k
    }
prost::encoding::message::merge::<alloc::boxed::Box<protobuf::test_messages::proto3::TestAllTypesProto3>, &mut &[u8]>
Line
Count
Source
1052
408k
    pub fn merge<M, B>(
1053
408k
        wire_type: WireType,
1054
408k
        msg: &mut M,
1055
408k
        buf: &mut B,
1056
408k
        ctx: DecodeContext,
1057
408k
    ) -> Result<(), DecodeError>
1058
408k
    where
1059
408k
        M: Message,
1060
408k
        B: Buf,
1061
    {
1062
408k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
408k
        ctx.limit_reached()?;
1064
408k
        merge_loop(
1065
408k
            msg,
1066
408k
            buf,
1067
408k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
408k
    }
prost::encoding::message::merge::<alloc::boxed::Box<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>, &mut &[u8]>
Line
Count
Source
1052
55.5k
    pub fn merge<M, B>(
1053
55.5k
        wire_type: WireType,
1054
55.5k
        msg: &mut M,
1055
55.5k
        buf: &mut B,
1056
55.5k
        ctx: DecodeContext,
1057
55.5k
    ) -> Result<(), DecodeError>
1058
55.5k
    where
1059
55.5k
        M: Message,
1060
55.5k
        B: Buf,
1061
    {
1062
55.5k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
55.5k
        ctx.limit_reached()?;
1064
55.5k
        merge_loop(
1065
55.5k
            msg,
1066
55.5k
            buf,
1067
55.5k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
55.5k
    }
prost::encoding::message::merge::<prost_types::Any, &mut &[u8]>
Line
Count
Source
1052
56.9k
    pub fn merge<M, B>(
1053
56.9k
        wire_type: WireType,
1054
56.9k
        msg: &mut M,
1055
56.9k
        buf: &mut B,
1056
56.9k
        ctx: DecodeContext,
1057
56.9k
    ) -> Result<(), DecodeError>
1058
56.9k
    where
1059
56.9k
        M: Message,
1060
56.9k
        B: Buf,
1061
    {
1062
56.9k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
56.9k
        ctx.limit_reached()?;
1064
56.9k
        merge_loop(
1065
56.9k
            msg,
1066
56.9k
            buf,
1067
56.9k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
56.9k
    }
prost::encoding::message::merge::<prost_types::Value, &mut &[u8]>
Line
Count
Source
1052
220k
    pub fn merge<M, B>(
1053
220k
        wire_type: WireType,
1054
220k
        msg: &mut M,
1055
220k
        buf: &mut B,
1056
220k
        ctx: DecodeContext,
1057
220k
    ) -> Result<(), DecodeError>
1058
220k
    where
1059
220k
        M: Message,
1060
220k
        B: Buf,
1061
    {
1062
220k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
220k
        ctx.limit_reached()?;
1064
220k
        merge_loop(
1065
220k
            msg,
1066
220k
            buf,
1067
220k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
220k
    }
prost::encoding::message::merge::<prost_types::Struct, &mut &[u8]>
Line
Count
Source
1052
237k
    pub fn merge<M, B>(
1053
237k
        wire_type: WireType,
1054
237k
        msg: &mut M,
1055
237k
        buf: &mut B,
1056
237k
        ctx: DecodeContext,
1057
237k
    ) -> Result<(), DecodeError>
1058
237k
    where
1059
237k
        M: Message,
1060
237k
        B: Buf,
1061
    {
1062
237k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
237k
        ctx.limit_reached()?;
1064
237k
        merge_loop(
1065
237k
            msg,
1066
237k
            buf,
1067
237k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
237k
    }
prost::encoding::message::merge::<prost_types::Duration, &mut &[u8]>
Line
Count
Source
1052
71.5k
    pub fn merge<M, B>(
1053
71.5k
        wire_type: WireType,
1054
71.5k
        msg: &mut M,
1055
71.5k
        buf: &mut B,
1056
71.5k
        ctx: DecodeContext,
1057
71.5k
    ) -> Result<(), DecodeError>
1058
71.5k
    where
1059
71.5k
        M: Message,
1060
71.5k
        B: Buf,
1061
    {
1062
71.5k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
71.5k
        ctx.limit_reached()?;
1064
71.5k
        merge_loop(
1065
71.5k
            msg,
1066
71.5k
            buf,
1067
71.5k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
71.5k
    }
prost::encoding::message::merge::<prost_types::FieldMask, &mut &[u8]>
Line
Count
Source
1052
34.9k
    pub fn merge<M, B>(
1053
34.9k
        wire_type: WireType,
1054
34.9k
        msg: &mut M,
1055
34.9k
        buf: &mut B,
1056
34.9k
        ctx: DecodeContext,
1057
34.9k
    ) -> Result<(), DecodeError>
1058
34.9k
    where
1059
34.9k
        M: Message,
1060
34.9k
        B: Buf,
1061
    {
1062
34.9k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
34.9k
        ctx.limit_reached()?;
1064
34.9k
        merge_loop(
1065
34.9k
            msg,
1066
34.9k
            buf,
1067
34.9k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
34.9k
    }
prost::encoding::message::merge::<prost_types::ListValue, &mut &[u8]>
Line
Count
Source
1052
115k
    pub fn merge<M, B>(
1053
115k
        wire_type: WireType,
1054
115k
        msg: &mut M,
1055
115k
        buf: &mut B,
1056
115k
        ctx: DecodeContext,
1057
115k
    ) -> Result<(), DecodeError>
1058
115k
    where
1059
115k
        M: Message,
1060
115k
        B: Buf,
1061
    {
1062
115k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
115k
        ctx.limit_reached()?;
1064
115k
        merge_loop(
1065
115k
            msg,
1066
115k
            buf,
1067
115k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
115k
    }
prost::encoding::message::merge::<prost_types::Timestamp, &mut &[u8]>
Line
Count
Source
1052
47.3k
    pub fn merge<M, B>(
1053
47.3k
        wire_type: WireType,
1054
47.3k
        msg: &mut M,
1055
47.3k
        buf: &mut B,
1056
47.3k
        ctx: DecodeContext,
1057
47.3k
    ) -> Result<(), DecodeError>
1058
47.3k
    where
1059
47.3k
        M: Message,
1060
47.3k
        B: Buf,
1061
    {
1062
47.3k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
47.3k
        ctx.limit_reached()?;
1064
47.3k
        merge_loop(
1065
47.3k
            msg,
1066
47.3k
            buf,
1067
47.3k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
47.3k
    }
prost::encoding::message::merge::<alloc::string::String, &mut &[u8]>
Line
Count
Source
1052
36.4k
    pub fn merge<M, B>(
1053
36.4k
        wire_type: WireType,
1054
36.4k
        msg: &mut M,
1055
36.4k
        buf: &mut B,
1056
36.4k
        ctx: DecodeContext,
1057
36.4k
    ) -> Result<(), DecodeError>
1058
36.4k
    where
1059
36.4k
        M: Message,
1060
36.4k
        B: Buf,
1061
    {
1062
36.4k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
36.4k
        ctx.limit_reached()?;
1064
36.4k
        merge_loop(
1065
36.4k
            msg,
1066
36.4k
            buf,
1067
36.4k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
36.4k
    }
prost::encoding::message::merge::<protobuf::test_messages::proto3::ForeignMessage, &mut &[u8]>
Line
Count
Source
1052
34.9k
    pub fn merge<M, B>(
1053
34.9k
        wire_type: WireType,
1054
34.9k
        msg: &mut M,
1055
34.9k
        buf: &mut B,
1056
34.9k
        ctx: DecodeContext,
1057
34.9k
    ) -> Result<(), DecodeError>
1058
34.9k
    where
1059
34.9k
        M: Message,
1060
34.9k
        B: Buf,
1061
    {
1062
34.9k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
34.9k
        ctx.limit_reached()?;
1064
34.9k
        merge_loop(
1065
34.9k
            msg,
1066
34.9k
            buf,
1067
34.9k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
34.9k
    }
prost::encoding::message::merge::<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, &mut &[u8]>
Line
Count
Source
1052
286k
    pub fn merge<M, B>(
1053
286k
        wire_type: WireType,
1054
286k
        msg: &mut M,
1055
286k
        buf: &mut B,
1056
286k
        ctx: DecodeContext,
1057
286k
    ) -> Result<(), DecodeError>
1058
286k
    where
1059
286k
        M: Message,
1060
286k
        B: Buf,
1061
    {
1062
286k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
286k
        ctx.limit_reached()?;
1064
286k
        merge_loop(
1065
286k
            msg,
1066
286k
            buf,
1067
286k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
286k
    }
prost::encoding::message::merge::<bool, &mut &[u8]>
Line
Count
Source
1052
19.2k
    pub fn merge<M, B>(
1053
19.2k
        wire_type: WireType,
1054
19.2k
        msg: &mut M,
1055
19.2k
        buf: &mut B,
1056
19.2k
        ctx: DecodeContext,
1057
19.2k
    ) -> Result<(), DecodeError>
1058
19.2k
    where
1059
19.2k
        M: Message,
1060
19.2k
        B: Buf,
1061
    {
1062
19.2k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
19.2k
        ctx.limit_reached()?;
1064
19.2k
        merge_loop(
1065
19.2k
            msg,
1066
19.2k
            buf,
1067
19.2k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
19.2k
    }
prost::encoding::message::merge::<f64, &mut &[u8]>
Line
Count
Source
1052
16.0k
    pub fn merge<M, B>(
1053
16.0k
        wire_type: WireType,
1054
16.0k
        msg: &mut M,
1055
16.0k
        buf: &mut B,
1056
16.0k
        ctx: DecodeContext,
1057
16.0k
    ) -> Result<(), DecodeError>
1058
16.0k
    where
1059
16.0k
        M: Message,
1060
16.0k
        B: Buf,
1061
    {
1062
16.0k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
16.0k
        ctx.limit_reached()?;
1064
16.0k
        merge_loop(
1065
16.0k
            msg,
1066
16.0k
            buf,
1067
16.0k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
16.0k
    }
prost::encoding::message::merge::<f32, &mut &[u8]>
Line
Count
Source
1052
93.6k
    pub fn merge<M, B>(
1053
93.6k
        wire_type: WireType,
1054
93.6k
        msg: &mut M,
1055
93.6k
        buf: &mut B,
1056
93.6k
        ctx: DecodeContext,
1057
93.6k
    ) -> Result<(), DecodeError>
1058
93.6k
    where
1059
93.6k
        M: Message,
1060
93.6k
        B: Buf,
1061
    {
1062
93.6k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
93.6k
        ctx.limit_reached()?;
1064
93.6k
        merge_loop(
1065
93.6k
            msg,
1066
93.6k
            buf,
1067
93.6k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
93.6k
    }
prost::encoding::message::merge::<i32, &mut &[u8]>
Line
Count
Source
1052
33.0k
    pub fn merge<M, B>(
1053
33.0k
        wire_type: WireType,
1054
33.0k
        msg: &mut M,
1055
33.0k
        buf: &mut B,
1056
33.0k
        ctx: DecodeContext,
1057
33.0k
    ) -> Result<(), DecodeError>
1058
33.0k
    where
1059
33.0k
        M: Message,
1060
33.0k
        B: Buf,
1061
    {
1062
33.0k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
33.0k
        ctx.limit_reached()?;
1064
33.0k
        merge_loop(
1065
33.0k
            msg,
1066
33.0k
            buf,
1067
33.0k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
33.0k
    }
prost::encoding::message::merge::<u32, &mut &[u8]>
Line
Count
Source
1052
8.04k
    pub fn merge<M, B>(
1053
8.04k
        wire_type: WireType,
1054
8.04k
        msg: &mut M,
1055
8.04k
        buf: &mut B,
1056
8.04k
        ctx: DecodeContext,
1057
8.04k
    ) -> Result<(), DecodeError>
1058
8.04k
    where
1059
8.04k
        M: Message,
1060
8.04k
        B: Buf,
1061
    {
1062
8.04k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
8.04k
        ctx.limit_reached()?;
1064
8.04k
        merge_loop(
1065
8.04k
            msg,
1066
8.04k
            buf,
1067
8.04k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
8.04k
    }
prost::encoding::message::merge::<i64, &mut &[u8]>
Line
Count
Source
1052
51.9k
    pub fn merge<M, B>(
1053
51.9k
        wire_type: WireType,
1054
51.9k
        msg: &mut M,
1055
51.9k
        buf: &mut B,
1056
51.9k
        ctx: DecodeContext,
1057
51.9k
    ) -> Result<(), DecodeError>
1058
51.9k
    where
1059
51.9k
        M: Message,
1060
51.9k
        B: Buf,
1061
    {
1062
51.9k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
51.9k
        ctx.limit_reached()?;
1064
51.9k
        merge_loop(
1065
51.9k
            msg,
1066
51.9k
            buf,
1067
51.9k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
51.9k
    }
prost::encoding::message::merge::<u64, &mut &[u8]>
Line
Count
Source
1052
75.1k
    pub fn merge<M, B>(
1053
75.1k
        wire_type: WireType,
1054
75.1k
        msg: &mut M,
1055
75.1k
        buf: &mut B,
1056
75.1k
        ctx: DecodeContext,
1057
75.1k
    ) -> Result<(), DecodeError>
1058
75.1k
    where
1059
75.1k
        M: Message,
1060
75.1k
        B: Buf,
1061
    {
1062
75.1k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
75.1k
        ctx.limit_reached()?;
1064
75.1k
        merge_loop(
1065
75.1k
            msg,
1066
75.1k
            buf,
1067
75.1k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
75.1k
    }
Unexecuted instantiation: prost::encoding::message::merge::<_, _>
prost::encoding::message::merge::<alloc::boxed::Box<protobuf::test_messages::proto2::TestAllTypesProto2>, &mut &[u8]>
Line
Count
Source
1052
237k
    pub fn merge<M, B>(
1053
237k
        wire_type: WireType,
1054
237k
        msg: &mut M,
1055
237k
        buf: &mut B,
1056
237k
        ctx: DecodeContext,
1057
237k
    ) -> Result<(), DecodeError>
1058
237k
    where
1059
237k
        M: Message,
1060
237k
        B: Buf,
1061
    {
1062
237k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
237k
        ctx.limit_reached()?;
1064
237k
        merge_loop(
1065
237k
            msg,
1066
237k
            buf,
1067
237k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
237k
    }
prost::encoding::message::merge::<alloc::boxed::Box<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>, &mut &[u8]>
Line
Count
Source
1052
17.6k
    pub fn merge<M, B>(
1053
17.6k
        wire_type: WireType,
1054
17.6k
        msg: &mut M,
1055
17.6k
        buf: &mut B,
1056
17.6k
        ctx: DecodeContext,
1057
17.6k
    ) -> Result<(), DecodeError>
1058
17.6k
    where
1059
17.6k
        M: Message,
1060
17.6k
        B: Buf,
1061
    {
1062
17.6k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
17.6k
        ctx.limit_reached()?;
1064
17.6k
        merge_loop(
1065
17.6k
            msg,
1066
17.6k
            buf,
1067
17.6k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
17.6k
    }
prost::encoding::message::merge::<protobuf::test_messages::proto2::ForeignMessageProto2, &mut &[u8]>
Line
Count
Source
1052
25.2k
    pub fn merge<M, B>(
1053
25.2k
        wire_type: WireType,
1054
25.2k
        msg: &mut M,
1055
25.2k
        buf: &mut B,
1056
25.2k
        ctx: DecodeContext,
1057
25.2k
    ) -> Result<(), DecodeError>
1058
25.2k
    where
1059
25.2k
        M: Message,
1060
25.2k
        B: Buf,
1061
    {
1062
25.2k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
25.2k
        ctx.limit_reached()?;
1064
25.2k
        merge_loop(
1065
25.2k
            msg,
1066
25.2k
            buf,
1067
25.2k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
25.2k
    }
prost::encoding::message::merge::<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, &mut &[u8]>
Line
Count
Source
1052
191k
    pub fn merge<M, B>(
1053
191k
        wire_type: WireType,
1054
191k
        msg: &mut M,
1055
191k
        buf: &mut B,
1056
191k
        ctx: DecodeContext,
1057
191k
    ) -> Result<(), DecodeError>
1058
191k
    where
1059
191k
        M: Message,
1060
191k
        B: Buf,
1061
    {
1062
191k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1063
191k
        ctx.limit_reached()?;
1064
191k
        merge_loop(
1065
191k
            msg,
1066
191k
            buf,
1067
191k
            ctx.enter_recursion(),
1068
            |msg: &mut M, buf: &mut B, ctx| {
1069
                let (tag, wire_type) = decode_key(buf)?;
1070
                msg.merge_field(tag, wire_type, buf, ctx)
1071
            },
1072
        )
1073
191k
    }
1074
1075
0
    pub fn encode_repeated<M, B>(tag: u32, messages: &[M], buf: &mut B)
1076
0
    where
1077
0
        M: Message,
1078
0
        B: BufMut,
1079
    {
1080
0
        for msg in messages {
1081
0
            encode(tag, msg, buf);
1082
0
        }
1083
0
    }
1084
1085
1.37M
    pub fn merge_repeated<M, B>(
1086
1.37M
        wire_type: WireType,
1087
1.37M
        messages: &mut Vec<M>,
1088
1.37M
        buf: &mut B,
1089
1.37M
        ctx: DecodeContext,
1090
1.37M
    ) -> Result<(), DecodeError>
1091
1.37M
    where
1092
1.37M
        M: Message + Default,
1093
1.37M
        B: Buf,
1094
    {
1095
1.37M
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
1.37M
        let mut msg = M::default();
1097
1.37M
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
1.37M
        messages.push(msg);
1099
1.37M
        Ok(())
1100
1.37M
    }
prost::encoding::message::merge_repeated::<alloc::vec::Vec<u8>, &mut &[u8]>
Line
Count
Source
1085
48.9k
    pub fn merge_repeated<M, B>(
1086
48.9k
        wire_type: WireType,
1087
48.9k
        messages: &mut Vec<M>,
1088
48.9k
        buf: &mut B,
1089
48.9k
        ctx: DecodeContext,
1090
48.9k
    ) -> Result<(), DecodeError>
1091
48.9k
    where
1092
48.9k
        M: Message + Default,
1093
48.9k
        B: Buf,
1094
    {
1095
48.9k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
48.9k
        let mut msg = M::default();
1097
48.9k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
48.8k
        messages.push(msg);
1099
48.8k
        Ok(())
1100
48.9k
    }
prost::encoding::message::merge_repeated::<prost_types::Any, &mut &[u8]>
Line
Count
Source
1085
53.2k
    pub fn merge_repeated<M, B>(
1086
53.2k
        wire_type: WireType,
1087
53.2k
        messages: &mut Vec<M>,
1088
53.2k
        buf: &mut B,
1089
53.2k
        ctx: DecodeContext,
1090
53.2k
    ) -> Result<(), DecodeError>
1091
53.2k
    where
1092
53.2k
        M: Message + Default,
1093
53.2k
        B: Buf,
1094
    {
1095
53.2k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
53.2k
        let mut msg = M::default();
1097
53.2k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
53.1k
        messages.push(msg);
1099
53.1k
        Ok(())
1100
53.2k
    }
prost::encoding::message::merge_repeated::<prost_types::Value, &mut &[u8]>
Line
Count
Source
1085
175k
    pub fn merge_repeated<M, B>(
1086
175k
        wire_type: WireType,
1087
175k
        messages: &mut Vec<M>,
1088
175k
        buf: &mut B,
1089
175k
        ctx: DecodeContext,
1090
175k
    ) -> Result<(), DecodeError>
1091
175k
    where
1092
175k
        M: Message + Default,
1093
175k
        B: Buf,
1094
    {
1095
175k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
175k
        let mut msg = M::default();
1097
175k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
174k
        messages.push(msg);
1099
174k
        Ok(())
1100
175k
    }
prost::encoding::message::merge_repeated::<prost_types::Struct, &mut &[u8]>
Line
Count
Source
1085
98.6k
    pub fn merge_repeated<M, B>(
1086
98.6k
        wire_type: WireType,
1087
98.6k
        messages: &mut Vec<M>,
1088
98.6k
        buf: &mut B,
1089
98.6k
        ctx: DecodeContext,
1090
98.6k
    ) -> Result<(), DecodeError>
1091
98.6k
    where
1092
98.6k
        M: Message + Default,
1093
98.6k
        B: Buf,
1094
    {
1095
98.6k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
98.6k
        let mut msg = M::default();
1097
98.6k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
98.5k
        messages.push(msg);
1099
98.5k
        Ok(())
1100
98.6k
    }
prost::encoding::message::merge_repeated::<prost_types::Duration, &mut &[u8]>
Line
Count
Source
1085
63.1k
    pub fn merge_repeated<M, B>(
1086
63.1k
        wire_type: WireType,
1087
63.1k
        messages: &mut Vec<M>,
1088
63.1k
        buf: &mut B,
1089
63.1k
        ctx: DecodeContext,
1090
63.1k
    ) -> Result<(), DecodeError>
1091
63.1k
    where
1092
63.1k
        M: Message + Default,
1093
63.1k
        B: Buf,
1094
    {
1095
63.1k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
63.1k
        let mut msg = M::default();
1097
63.1k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
63.0k
        messages.push(msg);
1099
63.0k
        Ok(())
1100
63.1k
    }
prost::encoding::message::merge_repeated::<prost_types::FieldMask, &mut &[u8]>
Line
Count
Source
1085
30.5k
    pub fn merge_repeated<M, B>(
1086
30.5k
        wire_type: WireType,
1087
30.5k
        messages: &mut Vec<M>,
1088
30.5k
        buf: &mut B,
1089
30.5k
        ctx: DecodeContext,
1090
30.5k
    ) -> Result<(), DecodeError>
1091
30.5k
    where
1092
30.5k
        M: Message + Default,
1093
30.5k
        B: Buf,
1094
    {
1095
30.5k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
30.5k
        let mut msg = M::default();
1097
30.5k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
30.3k
        messages.push(msg);
1099
30.3k
        Ok(())
1100
30.5k
    }
prost::encoding::message::merge_repeated::<prost_types::ListValue, &mut &[u8]>
Line
Count
Source
1085
63.6k
    pub fn merge_repeated<M, B>(
1086
63.6k
        wire_type: WireType,
1087
63.6k
        messages: &mut Vec<M>,
1088
63.6k
        buf: &mut B,
1089
63.6k
        ctx: DecodeContext,
1090
63.6k
    ) -> Result<(), DecodeError>
1091
63.6k
    where
1092
63.6k
        M: Message + Default,
1093
63.6k
        B: Buf,
1094
    {
1095
63.6k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
63.6k
        let mut msg = M::default();
1097
63.6k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
63.4k
        messages.push(msg);
1099
63.4k
        Ok(())
1100
63.6k
    }
prost::encoding::message::merge_repeated::<prost_types::Timestamp, &mut &[u8]>
Line
Count
Source
1085
43.3k
    pub fn merge_repeated<M, B>(
1086
43.3k
        wire_type: WireType,
1087
43.3k
        messages: &mut Vec<M>,
1088
43.3k
        buf: &mut B,
1089
43.3k
        ctx: DecodeContext,
1090
43.3k
    ) -> Result<(), DecodeError>
1091
43.3k
    where
1092
43.3k
        M: Message + Default,
1093
43.3k
        B: Buf,
1094
    {
1095
43.3k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
43.3k
        let mut msg = M::default();
1097
43.3k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
43.2k
        messages.push(msg);
1099
43.2k
        Ok(())
1100
43.3k
    }
prost::encoding::message::merge_repeated::<alloc::string::String, &mut &[u8]>
Line
Count
Source
1085
18.7k
    pub fn merge_repeated<M, B>(
1086
18.7k
        wire_type: WireType,
1087
18.7k
        messages: &mut Vec<M>,
1088
18.7k
        buf: &mut B,
1089
18.7k
        ctx: DecodeContext,
1090
18.7k
    ) -> Result<(), DecodeError>
1091
18.7k
    where
1092
18.7k
        M: Message + Default,
1093
18.7k
        B: Buf,
1094
    {
1095
18.7k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
18.7k
        let mut msg = M::default();
1097
18.7k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
18.6k
        messages.push(msg);
1099
18.6k
        Ok(())
1100
18.7k
    }
prost::encoding::message::merge_repeated::<protobuf::test_messages::proto3::ForeignMessage, &mut &[u8]>
Line
Count
Source
1085
20.0k
    pub fn merge_repeated<M, B>(
1086
20.0k
        wire_type: WireType,
1087
20.0k
        messages: &mut Vec<M>,
1088
20.0k
        buf: &mut B,
1089
20.0k
        ctx: DecodeContext,
1090
20.0k
    ) -> Result<(), DecodeError>
1091
20.0k
    where
1092
20.0k
        M: Message + Default,
1093
20.0k
        B: Buf,
1094
    {
1095
20.0k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
20.0k
        let mut msg = M::default();
1097
20.0k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
19.9k
        messages.push(msg);
1099
19.9k
        Ok(())
1100
20.0k
    }
prost::encoding::message::merge_repeated::<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, &mut &[u8]>
Line
Count
Source
1085
283k
    pub fn merge_repeated<M, B>(
1086
283k
        wire_type: WireType,
1087
283k
        messages: &mut Vec<M>,
1088
283k
        buf: &mut B,
1089
283k
        ctx: DecodeContext,
1090
283k
    ) -> Result<(), DecodeError>
1091
283k
    where
1092
283k
        M: Message + Default,
1093
283k
        B: Buf,
1094
    {
1095
283k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
283k
        let mut msg = M::default();
1097
283k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
282k
        messages.push(msg);
1099
282k
        Ok(())
1100
283k
    }
prost::encoding::message::merge_repeated::<bool, &mut &[u8]>
Line
Count
Source
1085
17.4k
    pub fn merge_repeated<M, B>(
1086
17.4k
        wire_type: WireType,
1087
17.4k
        messages: &mut Vec<M>,
1088
17.4k
        buf: &mut B,
1089
17.4k
        ctx: DecodeContext,
1090
17.4k
    ) -> Result<(), DecodeError>
1091
17.4k
    where
1092
17.4k
        M: Message + Default,
1093
17.4k
        B: Buf,
1094
    {
1095
17.4k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
17.4k
        let mut msg = M::default();
1097
17.4k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
17.3k
        messages.push(msg);
1099
17.3k
        Ok(())
1100
17.4k
    }
prost::encoding::message::merge_repeated::<f64, &mut &[u8]>
Line
Count
Source
1085
14.6k
    pub fn merge_repeated<M, B>(
1086
14.6k
        wire_type: WireType,
1087
14.6k
        messages: &mut Vec<M>,
1088
14.6k
        buf: &mut B,
1089
14.6k
        ctx: DecodeContext,
1090
14.6k
    ) -> Result<(), DecodeError>
1091
14.6k
    where
1092
14.6k
        M: Message + Default,
1093
14.6k
        B: Buf,
1094
    {
1095
14.6k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
14.6k
        let mut msg = M::default();
1097
14.6k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
14.5k
        messages.push(msg);
1099
14.5k
        Ok(())
1100
14.6k
    }
prost::encoding::message::merge_repeated::<f32, &mut &[u8]>
Line
Count
Source
1085
92.4k
    pub fn merge_repeated<M, B>(
1086
92.4k
        wire_type: WireType,
1087
92.4k
        messages: &mut Vec<M>,
1088
92.4k
        buf: &mut B,
1089
92.4k
        ctx: DecodeContext,
1090
92.4k
    ) -> Result<(), DecodeError>
1091
92.4k
    where
1092
92.4k
        M: Message + Default,
1093
92.4k
        B: Buf,
1094
    {
1095
92.4k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
92.4k
        let mut msg = M::default();
1097
92.4k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
92.2k
        messages.push(msg);
1099
92.2k
        Ok(())
1100
92.4k
    }
prost::encoding::message::merge_repeated::<i32, &mut &[u8]>
Line
Count
Source
1085
31.0k
    pub fn merge_repeated<M, B>(
1086
31.0k
        wire_type: WireType,
1087
31.0k
        messages: &mut Vec<M>,
1088
31.0k
        buf: &mut B,
1089
31.0k
        ctx: DecodeContext,
1090
31.0k
    ) -> Result<(), DecodeError>
1091
31.0k
    where
1092
31.0k
        M: Message + Default,
1093
31.0k
        B: Buf,
1094
    {
1095
31.0k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
31.0k
        let mut msg = M::default();
1097
31.0k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
30.9k
        messages.push(msg);
1099
30.9k
        Ok(())
1100
31.0k
    }
prost::encoding::message::merge_repeated::<u32, &mut &[u8]>
Line
Count
Source
1085
5.02k
    pub fn merge_repeated<M, B>(
1086
5.02k
        wire_type: WireType,
1087
5.02k
        messages: &mut Vec<M>,
1088
5.02k
        buf: &mut B,
1089
5.02k
        ctx: DecodeContext,
1090
5.02k
    ) -> Result<(), DecodeError>
1091
5.02k
    where
1092
5.02k
        M: Message + Default,
1093
5.02k
        B: Buf,
1094
    {
1095
5.02k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
5.02k
        let mut msg = M::default();
1097
5.02k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
4.94k
        messages.push(msg);
1099
4.94k
        Ok(())
1100
5.02k
    }
prost::encoding::message::merge_repeated::<i64, &mut &[u8]>
Line
Count
Source
1085
43.2k
    pub fn merge_repeated<M, B>(
1086
43.2k
        wire_type: WireType,
1087
43.2k
        messages: &mut Vec<M>,
1088
43.2k
        buf: &mut B,
1089
43.2k
        ctx: DecodeContext,
1090
43.2k
    ) -> Result<(), DecodeError>
1091
43.2k
    where
1092
43.2k
        M: Message + Default,
1093
43.2k
        B: Buf,
1094
    {
1095
43.2k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
43.2k
        let mut msg = M::default();
1097
43.2k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
43.2k
        messages.push(msg);
1099
43.2k
        Ok(())
1100
43.2k
    }
prost::encoding::message::merge_repeated::<u64, &mut &[u8]>
Line
Count
Source
1085
73.6k
    pub fn merge_repeated<M, B>(
1086
73.6k
        wire_type: WireType,
1087
73.6k
        messages: &mut Vec<M>,
1088
73.6k
        buf: &mut B,
1089
73.6k
        ctx: DecodeContext,
1090
73.6k
    ) -> Result<(), DecodeError>
1091
73.6k
    where
1092
73.6k
        M: Message + Default,
1093
73.6k
        B: Buf,
1094
    {
1095
73.6k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
73.5k
        let mut msg = M::default();
1097
73.5k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
73.5k
        messages.push(msg);
1099
73.5k
        Ok(())
1100
73.6k
    }
Unexecuted instantiation: prost::encoding::message::merge_repeated::<_, _>
prost::encoding::message::merge_repeated::<protobuf::test_messages::proto2::ForeignMessageProto2, &mut &[u8]>
Line
Count
Source
1085
16.7k
    pub fn merge_repeated<M, B>(
1086
16.7k
        wire_type: WireType,
1087
16.7k
        messages: &mut Vec<M>,
1088
16.7k
        buf: &mut B,
1089
16.7k
        ctx: DecodeContext,
1090
16.7k
    ) -> Result<(), DecodeError>
1091
16.7k
    where
1092
16.7k
        M: Message + Default,
1093
16.7k
        B: Buf,
1094
    {
1095
16.7k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
16.7k
        let mut msg = M::default();
1097
16.7k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
16.6k
        messages.push(msg);
1099
16.6k
        Ok(())
1100
16.7k
    }
prost::encoding::message::merge_repeated::<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, &mut &[u8]>
Line
Count
Source
1085
182k
    pub fn merge_repeated<M, B>(
1086
182k
        wire_type: WireType,
1087
182k
        messages: &mut Vec<M>,
1088
182k
        buf: &mut B,
1089
182k
        ctx: DecodeContext,
1090
182k
    ) -> Result<(), DecodeError>
1091
182k
    where
1092
182k
        M: Message + Default,
1093
182k
        B: Buf,
1094
    {
1095
182k
        check_wire_type(WireType::LengthDelimited, wire_type)?;
1096
182k
        let mut msg = M::default();
1097
182k
        merge(WireType::LengthDelimited, &mut msg, buf, ctx)?;
1098
181k
        messages.push(msg);
1099
181k
        Ok(())
1100
182k
    }
1101
1102
    #[inline]
1103
2.26M
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
2.26M
    where
1105
2.26M
        M: Message,
1106
    {
1107
2.26M
        let len = msg.encoded_len();
1108
2.26M
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
2.26M
    }
prost::encoding::message::encoded_len::<alloc::vec::Vec<u8>>
Line
Count
Source
1103
6.10k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
6.10k
    where
1105
6.10k
        M: Message,
1106
    {
1107
6.10k
        let len = msg.encoded_len();
1108
6.10k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
6.10k
    }
prost::encoding::message::encoded_len::<alloc::boxed::Box<protobuf::test_messages::proto3::TestAllTypesProto3>>
Line
Count
Source
1103
1.02M
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
1.02M
    where
1105
1.02M
        M: Message,
1106
    {
1107
1.02M
        let len = msg.encoded_len();
1108
1.02M
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
1.02M
    }
prost::encoding::message::encoded_len::<alloc::boxed::Box<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>>
Line
Count
Source
1103
149k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
149k
    where
1105
149k
        M: Message,
1106
    {
1107
149k
        let len = msg.encoded_len();
1108
149k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
149k
    }
prost::encoding::message::encoded_len::<prost_types::Any>
Line
Count
Source
1103
8.88k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
8.88k
    where
1105
8.88k
        M: Message,
1106
    {
1107
8.88k
        let len = msg.encoded_len();
1108
8.88k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
8.88k
    }
prost::encoding::message::encoded_len::<prost_types::Value>
Line
Count
Source
1103
68.9k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
68.9k
    where
1105
68.9k
        M: Message,
1106
    {
1107
68.9k
        let len = msg.encoded_len();
1108
68.9k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
68.9k
    }
prost::encoding::message::encoded_len::<prost_types::Struct>
Line
Count
Source
1103
56.2k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
56.2k
    where
1105
56.2k
        M: Message,
1106
    {
1107
56.2k
        let len = msg.encoded_len();
1108
56.2k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
56.2k
    }
prost::encoding::message::encoded_len::<prost_types::Duration>
Line
Count
Source
1103
13.1k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
13.1k
    where
1105
13.1k
        M: Message,
1106
    {
1107
13.1k
        let len = msg.encoded_len();
1108
13.1k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
13.1k
    }
prost::encoding::message::encoded_len::<prost_types::FieldMask>
Line
Count
Source
1103
10.8k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
10.8k
    where
1105
10.8k
        M: Message,
1106
    {
1107
10.8k
        let len = msg.encoded_len();
1108
10.8k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
10.8k
    }
prost::encoding::message::encoded_len::<prost_types::ListValue>
Line
Count
Source
1103
158k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
158k
    where
1105
158k
        M: Message,
1106
    {
1107
158k
        let len = msg.encoded_len();
1108
158k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
158k
    }
prost::encoding::message::encoded_len::<prost_types::Timestamp>
Line
Count
Source
1103
8.52k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
8.52k
    where
1105
8.52k
        M: Message,
1106
    {
1107
8.52k
        let len = msg.encoded_len();
1108
8.52k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
8.52k
    }
prost::encoding::message::encoded_len::<alloc::string::String>
Line
Count
Source
1103
46.4k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
46.4k
    where
1105
46.4k
        M: Message,
1106
    {
1107
46.4k
        let len = msg.encoded_len();
1108
46.4k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
46.4k
    }
prost::encoding::message::encoded_len::<protobuf::test_messages::proto3::ForeignMessage>
Line
Count
Source
1103
25.2k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
25.2k
    where
1105
25.2k
        M: Message,
1106
    {
1107
25.2k
        let len = msg.encoded_len();
1108
25.2k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
25.2k
    }
prost::encoding::message::encoded_len::<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>
Line
Count
Source
1103
10.1k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
10.1k
    where
1105
10.1k
        M: Message,
1106
    {
1107
10.1k
        let len = msg.encoded_len();
1108
10.1k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
10.1k
    }
prost::encoding::message::encoded_len::<bool>
Line
Count
Source
1103
3.13k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
3.13k
    where
1105
3.13k
        M: Message,
1106
    {
1107
3.13k
        let len = msg.encoded_len();
1108
3.13k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
3.13k
    }
prost::encoding::message::encoded_len::<f64>
Line
Count
Source
1103
2.47k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
2.47k
    where
1105
2.47k
        M: Message,
1106
    {
1107
2.47k
        let len = msg.encoded_len();
1108
2.47k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
2.47k
    }
prost::encoding::message::encoded_len::<f32>
Line
Count
Source
1103
3.10k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
3.10k
    where
1105
3.10k
        M: Message,
1106
    {
1107
3.10k
        let len = msg.encoded_len();
1108
3.10k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
3.10k
    }
prost::encoding::message::encoded_len::<i32>
Line
Count
Source
1103
4.92k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
4.92k
    where
1105
4.92k
        M: Message,
1106
    {
1107
4.92k
        let len = msg.encoded_len();
1108
4.92k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
4.92k
    }
prost::encoding::message::encoded_len::<u32>
Line
Count
Source
1103
5.19k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
5.19k
    where
1105
5.19k
        M: Message,
1106
    {
1107
5.19k
        let len = msg.encoded_len();
1108
5.19k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
5.19k
    }
prost::encoding::message::encoded_len::<i64>
Line
Count
Source
1103
25.6k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
25.6k
    where
1105
25.6k
        M: Message,
1106
    {
1107
25.6k
        let len = msg.encoded_len();
1108
25.6k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
25.6k
    }
prost::encoding::message::encoded_len::<u64>
Line
Count
Source
1103
3.64k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
3.64k
    where
1105
3.64k
        M: Message,
1106
    {
1107
3.64k
        let len = msg.encoded_len();
1108
3.64k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
3.64k
    }
Unexecuted instantiation: prost::encoding::message::encoded_len::<_>
prost::encoding::message::encoded_len::<alloc::boxed::Box<protobuf::test_messages::proto2::TestAllTypesProto2>>
Line
Count
Source
1103
555k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
555k
    where
1105
555k
        M: Message,
1106
    {
1107
555k
        let len = msg.encoded_len();
1108
555k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
555k
    }
prost::encoding::message::encoded_len::<alloc::boxed::Box<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>>
Line
Count
Source
1103
37.6k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
37.6k
    where
1105
37.6k
        M: Message,
1106
    {
1107
37.6k
        let len = msg.encoded_len();
1108
37.6k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
37.6k
    }
prost::encoding::message::encoded_len::<protobuf::test_messages::proto2::ForeignMessageProto2>
Line
Count
Source
1103
13.3k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
13.3k
    where
1105
13.3k
        M: Message,
1106
    {
1107
13.3k
        let len = msg.encoded_len();
1108
13.3k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
13.3k
    }
prost::encoding::message::encoded_len::<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>
Line
Count
Source
1103
26.2k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1104
26.2k
    where
1105
26.2k
        M: Message,
1106
    {
1107
26.2k
        let len = msg.encoded_len();
1108
26.2k
        key_len(tag) + encoded_len_varint(len as u64) + len
1109
26.2k
    }
1110
1111
    #[inline]
1112
27.7M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
27.7M
    where
1114
27.7M
        M: Message,
1115
    {
1116
27.7M
        key_len(tag) * messages.len()
1117
27.7M
            + messages
1118
27.7M
                .iter()
1119
27.7M
                .map(Message::encoded_len)
1120
27.7M
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<alloc::vec::Vec<u8>>::{closure#0}
Line
Count
Source
1120
94.8k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<prost_types::Any>::{closure#0}
Line
Count
Source
1120
90.4k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<prost_types::Value>::{closure#0}
Line
Count
Source
1120
531k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<prost_types::Struct>::{closure#0}
Line
Count
Source
1120
160k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<prost_types::Duration>::{closure#0}
Line
Count
Source
1120
96.6k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<prost_types::FieldMask>::{closure#0}
Line
Count
Source
1120
45.9k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<prost_types::ListValue>::{closure#0}
Line
Count
Source
1120
100k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<prost_types::Timestamp>::{closure#0}
Line
Count
Source
1120
69.2k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<alloc::string::String>::{closure#0}
Line
Count
Source
1120
31.4k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<protobuf::test_messages::proto3::ForeignMessage>::{closure#0}
Line
Count
Source
1120
34.2k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>::{closure#0}
Line
Count
Source
1120
431k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<bool>::{closure#0}
Line
Count
Source
1120
38.7k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<f64>::{closure#0}
Line
Count
Source
1120
38.9k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<f32>::{closure#0}
Line
Count
Source
1120
135k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<i32>::{closure#0}
Line
Count
Source
1120
61.0k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<u32>::{closure#0}
Line
Count
Source
1120
12.8k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<i64>::{closure#0}
Line
Count
Source
1120
66.0k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<u64>::{closure#0}
Line
Count
Source
1120
107k
                .map(|len| len + encoded_len_varint(len as u64))
Unexecuted instantiation: prost::encoding::message::encoded_len_repeated::<_>::{closure#0}
prost::encoding::message::encoded_len_repeated::<protobuf::test_messages::proto2::ForeignMessageProto2>::{closure#0}
Line
Count
Source
1120
37.8k
                .map(|len| len + encoded_len_varint(len as u64))
prost::encoding::message::encoded_len_repeated::<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>::{closure#0}
Line
Count
Source
1120
282k
                .map(|len| len + encoded_len_varint(len as u64))
1121
27.7M
                .sum::<usize>()
1122
27.7M
    }
prost::encoding::message::encoded_len_repeated::<alloc::vec::Vec<u8>>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<prost_types::Any>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<prost_types::Value>
Line
Count
Source
1112
1.78M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.78M
    where
1114
1.78M
        M: Message,
1115
    {
1116
1.78M
        key_len(tag) * messages.len()
1117
1.78M
            + messages
1118
1.78M
                .iter()
1119
1.78M
                .map(Message::encoded_len)
1120
1.78M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.78M
                .sum::<usize>()
1122
1.78M
    }
prost::encoding::message::encoded_len_repeated::<prost_types::Struct>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<prost_types::Duration>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<prost_types::FieldMask>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<prost_types::ListValue>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<prost_types::Timestamp>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<alloc::string::String>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<protobuf::test_messages::proto3::ForeignMessage>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<bool>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<f64>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<f32>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<i32>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<u32>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<i64>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
prost::encoding::message::encoded_len_repeated::<u64>
Line
Count
Source
1112
1.43M
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
1.43M
    where
1114
1.43M
        M: Message,
1115
    {
1116
1.43M
        key_len(tag) * messages.len()
1117
1.43M
            + messages
1118
1.43M
                .iter()
1119
1.43M
                .map(Message::encoded_len)
1120
1.43M
                .map(|len| len + encoded_len_varint(len as u64))
1121
1.43M
                .sum::<usize>()
1122
1.43M
    }
Unexecuted instantiation: prost::encoding::message::encoded_len_repeated::<_>
prost::encoding::message::encoded_len_repeated::<protobuf::test_messages::proto2::ForeignMessageProto2>
Line
Count
Source
1112
800k
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
800k
    where
1114
800k
        M: Message,
1115
    {
1116
800k
        key_len(tag) * messages.len()
1117
800k
            + messages
1118
800k
                .iter()
1119
800k
                .map(Message::encoded_len)
1120
800k
                .map(|len| len + encoded_len_varint(len as u64))
1121
800k
                .sum::<usize>()
1122
800k
    }
prost::encoding::message::encoded_len_repeated::<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>
Line
Count
Source
1112
800k
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1113
800k
    where
1114
800k
        M: Message,
1115
    {
1116
800k
        key_len(tag) * messages.len()
1117
800k
            + messages
1118
800k
                .iter()
1119
800k
                .map(Message::encoded_len)
1120
800k
                .map(|len| len + encoded_len_varint(len as u64))
1121
800k
                .sum::<usize>()
1122
800k
    }
1123
}
1124
1125
pub mod group {
1126
    use super::*;
1127
1128
7.43k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1129
7.43k
    where
1130
7.43k
        M: Message,
1131
7.43k
        B: BufMut,
1132
    {
1133
7.43k
        encode_key(tag, WireType::StartGroup, buf);
1134
7.43k
        msg.encode_raw(buf);
1135
7.43k
        encode_key(tag, WireType::EndGroup, buf);
1136
7.43k
    }
Unexecuted instantiation: prost::encoding::group::encode::<_, _>
prost::encoding::group::encode::<protobuf::test_messages::proto2::test_all_types_proto2::Data, alloc::vec::Vec<u8>>
Line
Count
Source
1128
7.43k
    pub fn encode<M, B>(tag: u32, msg: &M, buf: &mut B)
1129
7.43k
    where
1130
7.43k
        M: Message,
1131
7.43k
        B: BufMut,
1132
    {
1133
7.43k
        encode_key(tag, WireType::StartGroup, buf);
1134
7.43k
        msg.encode_raw(buf);
1135
7.43k
        encode_key(tag, WireType::EndGroup, buf);
1136
7.43k
    }
1137
1138
10.2k
    pub fn merge<M, B>(
1139
10.2k
        tag: u32,
1140
10.2k
        wire_type: WireType,
1141
10.2k
        msg: &mut M,
1142
10.2k
        buf: &mut B,
1143
10.2k
        ctx: DecodeContext,
1144
10.2k
    ) -> Result<(), DecodeError>
1145
10.2k
    where
1146
10.2k
        M: Message,
1147
10.2k
        B: Buf,
1148
    {
1149
10.2k
        check_wire_type(WireType::StartGroup, wire_type)?;
1150
1151
10.2k
        ctx.limit_reached()?;
1152
        loop {
1153
20.2k
            let (field_tag, field_wire_type) = decode_key(buf)?;
1154
20.2k
            if field_wire_type == WireType::EndGroup {
1155
10.1k
                if field_tag != tag {
1156
37
                    return Err(DecodeError::new("unexpected end group tag"));
1157
10.1k
                }
1158
10.1k
                return Ok(());
1159
10.0k
            }
1160
1161
10.0k
            M::merge_field(msg, field_tag, field_wire_type, buf, ctx.enter_recursion())?;
1162
        }
1163
10.2k
    }
Unexecuted instantiation: prost::encoding::group::merge::<_, _>
prost::encoding::group::merge::<protobuf::test_messages::proto2::test_all_types_proto2::Data, &mut &[u8]>
Line
Count
Source
1138
10.2k
    pub fn merge<M, B>(
1139
10.2k
        tag: u32,
1140
10.2k
        wire_type: WireType,
1141
10.2k
        msg: &mut M,
1142
10.2k
        buf: &mut B,
1143
10.2k
        ctx: DecodeContext,
1144
10.2k
    ) -> Result<(), DecodeError>
1145
10.2k
    where
1146
10.2k
        M: Message,
1147
10.2k
        B: Buf,
1148
    {
1149
10.2k
        check_wire_type(WireType::StartGroup, wire_type)?;
1150
1151
10.2k
        ctx.limit_reached()?;
1152
        loop {
1153
20.2k
            let (field_tag, field_wire_type) = decode_key(buf)?;
1154
20.2k
            if field_wire_type == WireType::EndGroup {
1155
10.1k
                if field_tag != tag {
1156
37
                    return Err(DecodeError::new("unexpected end group tag"));
1157
10.1k
                }
1158
10.1k
                return Ok(());
1159
10.0k
            }
1160
1161
10.0k
            M::merge_field(msg, field_tag, field_wire_type, buf, ctx.enter_recursion())?;
1162
        }
1163
10.2k
    }
1164
1165
0
    pub fn encode_repeated<M, B>(tag: u32, messages: &[M], buf: &mut B)
1166
0
    where
1167
0
        M: Message,
1168
0
        B: BufMut,
1169
    {
1170
0
        for msg in messages {
1171
0
            encode(tag, msg, buf);
1172
0
        }
1173
0
    }
1174
1175
0
    pub fn merge_repeated<M, B>(
1176
0
        tag: u32,
1177
0
        wire_type: WireType,
1178
0
        messages: &mut Vec<M>,
1179
0
        buf: &mut B,
1180
0
        ctx: DecodeContext,
1181
0
    ) -> Result<(), DecodeError>
1182
0
    where
1183
0
        M: Message + Default,
1184
0
        B: Buf,
1185
    {
1186
0
        check_wire_type(WireType::StartGroup, wire_type)?;
1187
0
        let mut msg = M::default();
1188
0
        merge(tag, WireType::StartGroup, &mut msg, buf, ctx)?;
1189
0
        messages.push(msg);
1190
0
        Ok(())
1191
0
    }
1192
1193
    #[inline]
1194
25.2k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1195
25.2k
    where
1196
25.2k
        M: Message,
1197
    {
1198
25.2k
        2 * key_len(tag) + msg.encoded_len()
1199
25.2k
    }
Unexecuted instantiation: prost::encoding::group::encoded_len::<_>
prost::encoding::group::encoded_len::<protobuf::test_messages::proto2::test_all_types_proto2::Data>
Line
Count
Source
1194
25.2k
    pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
1195
25.2k
    where
1196
25.2k
        M: Message,
1197
    {
1198
25.2k
        2 * key_len(tag) + msg.encoded_len()
1199
25.2k
    }
1200
1201
    #[inline]
1202
0
    pub fn encoded_len_repeated<M>(tag: u32, messages: &[M]) -> usize
1203
0
    where
1204
0
        M: Message,
1205
    {
1206
0
        2 * key_len(tag) * messages.len() + messages.iter().map(Message::encoded_len).sum::<usize>()
1207
0
    }
1208
}
1209
1210
/// Rust doesn't have a `Map` trait, so macros are currently the best way to be
1211
/// generic over `HashMap` and `BTreeMap`.
1212
macro_rules! map {
1213
    ($map_ty:ident) => {
1214
        use crate::encoding::*;
1215
        use core::hash::Hash;
1216
1217
        /// Generic protobuf map encode function.
1218
10.7M
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
10.7M
            key_encode: KE,
1220
10.7M
            key_encoded_len: KL,
1221
10.7M
            val_encode: VE,
1222
10.7M
            val_encoded_len: VL,
1223
10.7M
            tag: u32,
1224
10.7M
            values: &$map_ty<K, V>,
1225
10.7M
            buf: &mut B,
1226
10.7M
        ) where
1227
10.7M
            K: Default + Eq + Hash + Ord,
1228
10.7M
            V: Default + PartialEq,
1229
10.7M
            B: BufMut,
1230
10.7M
            KE: Fn(u32, &K, &mut B),
1231
10.7M
            KL: Fn(u32, &K) -> usize,
1232
10.7M
            VE: Fn(u32, &V, &mut B),
1233
10.7M
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
10.7M
            encode_with_default(
1236
10.7M
                key_encode,
1237
10.7M
                key_encoded_len,
1238
10.7M
                val_encode,
1239
10.7M
                val_encoded_len,
1240
10.7M
                &V::default(),
1241
10.7M
                tag,
1242
10.7M
                values,
1243
10.7M
                buf,
1244
            )
1245
10.7M
        }
prost::encoding::btree_map::encode::<alloc::string::String, alloc::string::String, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<alloc::string::String, alloc::vec::Vec<u8>, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::bytes::encode<alloc::vec::Vec<u8>, alloc::vec::Vec<u8>>, prost::encoding::bytes::encoded_len<alloc::vec::Vec<u8>>>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<alloc::string::String, prost_types::Value, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::message::encode<prost_types::Value, alloc::vec::Vec<u8>>, prost::encoding::message::encoded_len<prost_types::Value>>
Line
Count
Source
1218
109k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
109k
            key_encode: KE,
1220
109k
            key_encoded_len: KL,
1221
109k
            val_encode: VE,
1222
109k
            val_encoded_len: VL,
1223
109k
            tag: u32,
1224
109k
            values: &$map_ty<K, V>,
1225
109k
            buf: &mut B,
1226
109k
        ) where
1227
109k
            K: Default + Eq + Hash + Ord,
1228
109k
            V: Default + PartialEq,
1229
109k
            B: BufMut,
1230
109k
            KE: Fn(u32, &K, &mut B),
1231
109k
            KL: Fn(u32, &K) -> usize,
1232
109k
            VE: Fn(u32, &V, &mut B),
1233
109k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
109k
            encode_with_default(
1236
109k
                key_encode,
1237
109k
                key_encoded_len,
1238
109k
                val_encode,
1239
109k
                val_encoded_len,
1240
109k
                &V::default(),
1241
109k
                tag,
1242
109k
                values,
1243
109k
                buf,
1244
            )
1245
109k
        }
prost::encoding::btree_map::encode::<alloc::string::String, protobuf::test_messages::proto3::ForeignMessage, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::message::encode<protobuf::test_messages::proto3::ForeignMessage, alloc::vec::Vec<u8>>, prost::encoding::message::encoded_len<protobuf::test_messages::proto3::ForeignMessage>>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<alloc::string::String, protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::message::encode<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, alloc::vec::Vec<u8>>, prost::encoding::message::encoded_len<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<bool, bool, alloc::vec::Vec<u8>, prost::encoding::bool::encode<alloc::vec::Vec<u8>>, prost::encoding::bool::encoded_len, prost::encoding::bool::encode<alloc::vec::Vec<u8>>, prost::encoding::bool::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<i32, f64, alloc::vec::Vec<u8>, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len, prost::encoding::double::encode<alloc::vec::Vec<u8>>, prost::encoding::double::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<i32, f32, alloc::vec::Vec<u8>, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len, prost::encoding::float::encode<alloc::vec::Vec<u8>>, prost::encoding::float::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<i32, i32, alloc::vec::Vec<u8>, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<i32, i32, alloc::vec::Vec<u8>, prost::encoding::sint32::encode<alloc::vec::Vec<u8>>, prost::encoding::sint32::encoded_len, prost::encoding::sint32::encode<alloc::vec::Vec<u8>>, prost::encoding::sint32::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<i32, i32, alloc::vec::Vec<u8>, prost::encoding::sfixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed32::encoded_len, prost::encoding::sfixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed32::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<u32, u32, alloc::vec::Vec<u8>, prost::encoding::uint32::encode<alloc::vec::Vec<u8>>, prost::encoding::uint32::encoded_len, prost::encoding::uint32::encode<alloc::vec::Vec<u8>>, prost::encoding::uint32::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<u32, u32, alloc::vec::Vec<u8>, prost::encoding::fixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed32::encoded_len, prost::encoding::fixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed32::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<i64, i64, alloc::vec::Vec<u8>, prost::encoding::int64::encode<alloc::vec::Vec<u8>>, prost::encoding::int64::encoded_len, prost::encoding::int64::encode<alloc::vec::Vec<u8>>, prost::encoding::int64::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<i64, i64, alloc::vec::Vec<u8>, prost::encoding::sint64::encode<alloc::vec::Vec<u8>>, prost::encoding::sint64::encoded_len, prost::encoding::sint64::encode<alloc::vec::Vec<u8>>, prost::encoding::sint64::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<i64, i64, alloc::vec::Vec<u8>, prost::encoding::sfixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed64::encoded_len, prost::encoding::sfixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed64::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<u64, u64, alloc::vec::Vec<u8>, prost::encoding::uint64::encode<alloc::vec::Vec<u8>>, prost::encoding::uint64::encoded_len, prost::encoding::uint64::encode<alloc::vec::Vec<u8>>, prost::encoding::uint64::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
prost::encoding::btree_map::encode::<u64, u64, alloc::vec::Vec<u8>, prost::encoding::fixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed64::encoded_len, prost::encoding::fixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed64::encoded_len>
Line
Count
Source
1218
393k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
393k
            key_encode: KE,
1220
393k
            key_encoded_len: KL,
1221
393k
            val_encode: VE,
1222
393k
            val_encoded_len: VL,
1223
393k
            tag: u32,
1224
393k
            values: &$map_ty<K, V>,
1225
393k
            buf: &mut B,
1226
393k
        ) where
1227
393k
            K: Default + Eq + Hash + Ord,
1228
393k
            V: Default + PartialEq,
1229
393k
            B: BufMut,
1230
393k
            KE: Fn(u32, &K, &mut B),
1231
393k
            KL: Fn(u32, &K) -> usize,
1232
393k
            VE: Fn(u32, &V, &mut B),
1233
393k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
393k
            encode_with_default(
1236
393k
                key_encode,
1237
393k
                key_encoded_len,
1238
393k
                val_encode,
1239
393k
                val_encoded_len,
1240
393k
                &V::default(),
1241
393k
                tag,
1242
393k
                values,
1243
393k
                buf,
1244
            )
1245
393k
        }
Unexecuted instantiation: prost::encoding::hash_map::encode::<_, _, _, _, _, _, _>
Unexecuted instantiation: prost::encoding::btree_map::encode::<_, _, _, _, _, _, _>
prost::encoding::btree_map::encode::<alloc::string::String, alloc::string::String, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<alloc::string::String, alloc::vec::Vec<u8>, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::bytes::encode<alloc::vec::Vec<u8>, alloc::vec::Vec<u8>>, prost::encoding::bytes::encoded_len<alloc::vec::Vec<u8>>>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<alloc::string::String, protobuf::test_messages::proto2::ForeignMessageProto2, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::message::encode<protobuf::test_messages::proto2::ForeignMessageProto2, alloc::vec::Vec<u8>>, prost::encoding::message::encoded_len<protobuf::test_messages::proto2::ForeignMessageProto2>>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<alloc::string::String, protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::message::encode<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, alloc::vec::Vec<u8>>, prost::encoding::message::encoded_len<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<bool, bool, alloc::vec::Vec<u8>, prost::encoding::bool::encode<alloc::vec::Vec<u8>>, prost::encoding::bool::encoded_len, prost::encoding::bool::encode<alloc::vec::Vec<u8>>, prost::encoding::bool::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<i32, f64, alloc::vec::Vec<u8>, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len, prost::encoding::double::encode<alloc::vec::Vec<u8>>, prost::encoding::double::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<i32, f32, alloc::vec::Vec<u8>, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len, prost::encoding::float::encode<alloc::vec::Vec<u8>>, prost::encoding::float::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<i32, i32, alloc::vec::Vec<u8>, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<i32, i32, alloc::vec::Vec<u8>, prost::encoding::sint32::encode<alloc::vec::Vec<u8>>, prost::encoding::sint32::encoded_len, prost::encoding::sint32::encode<alloc::vec::Vec<u8>>, prost::encoding::sint32::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<i32, i32, alloc::vec::Vec<u8>, prost::encoding::sfixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed32::encoded_len, prost::encoding::sfixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed32::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<u32, u32, alloc::vec::Vec<u8>, prost::encoding::uint32::encode<alloc::vec::Vec<u8>>, prost::encoding::uint32::encoded_len, prost::encoding::uint32::encode<alloc::vec::Vec<u8>>, prost::encoding::uint32::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<u32, u32, alloc::vec::Vec<u8>, prost::encoding::fixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed32::encoded_len, prost::encoding::fixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed32::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<i64, i64, alloc::vec::Vec<u8>, prost::encoding::int64::encode<alloc::vec::Vec<u8>>, prost::encoding::int64::encoded_len, prost::encoding::int64::encode<alloc::vec::Vec<u8>>, prost::encoding::int64::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<i64, i64, alloc::vec::Vec<u8>, prost::encoding::sint64::encode<alloc::vec::Vec<u8>>, prost::encoding::sint64::encoded_len, prost::encoding::sint64::encode<alloc::vec::Vec<u8>>, prost::encoding::sint64::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<i64, i64, alloc::vec::Vec<u8>, prost::encoding::sfixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed64::encoded_len, prost::encoding::sfixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed64::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<u64, u64, alloc::vec::Vec<u8>, prost::encoding::uint64::encode<alloc::vec::Vec<u8>>, prost::encoding::uint64::encoded_len, prost::encoding::uint64::encode<alloc::vec::Vec<u8>>, prost::encoding::uint64::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
prost::encoding::btree_map::encode::<u64, u64, alloc::vec::Vec<u8>, prost::encoding::fixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed64::encoded_len, prost::encoding::fixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed64::encoded_len>
Line
Count
Source
1218
231k
        pub fn encode<K, V, B, KE, KL, VE, VL>(
1219
231k
            key_encode: KE,
1220
231k
            key_encoded_len: KL,
1221
231k
            val_encode: VE,
1222
231k
            val_encoded_len: VL,
1223
231k
            tag: u32,
1224
231k
            values: &$map_ty<K, V>,
1225
231k
            buf: &mut B,
1226
231k
        ) where
1227
231k
            K: Default + Eq + Hash + Ord,
1228
231k
            V: Default + PartialEq,
1229
231k
            B: BufMut,
1230
231k
            KE: Fn(u32, &K, &mut B),
1231
231k
            KL: Fn(u32, &K) -> usize,
1232
231k
            VE: Fn(u32, &V, &mut B),
1233
231k
            VL: Fn(u32, &V) -> usize,
1234
        {
1235
231k
            encode_with_default(
1236
231k
                key_encode,
1237
231k
                key_encoded_len,
1238
231k
                val_encode,
1239
231k
                val_encoded_len,
1240
231k
                &V::default(),
1241
231k
                tag,
1242
231k
                values,
1243
231k
                buf,
1244
            )
1245
231k
        }
1246
1247
        /// Generic protobuf map merge function.
1248
4.51M
        pub fn merge<K, V, B, KM, VM>(
1249
4.51M
            key_merge: KM,
1250
4.51M
            val_merge: VM,
1251
4.51M
            values: &mut $map_ty<K, V>,
1252
4.51M
            buf: &mut B,
1253
4.51M
            ctx: DecodeContext,
1254
4.51M
        ) -> Result<(), DecodeError>
1255
4.51M
        where
1256
4.51M
            K: Default + Eq + Hash + Ord,
1257
4.51M
            V: Default,
1258
4.51M
            B: Buf,
1259
4.51M
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
4.51M
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
4.51M
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
4.51M
        }
prost::encoding::btree_map::merge::<alloc::string::String, alloc::string::String, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::string::merge<&mut &[u8]>>
Line
Count
Source
1248
186k
        pub fn merge<K, V, B, KM, VM>(
1249
186k
            key_merge: KM,
1250
186k
            val_merge: VM,
1251
186k
            values: &mut $map_ty<K, V>,
1252
186k
            buf: &mut B,
1253
186k
            ctx: DecodeContext,
1254
186k
        ) -> Result<(), DecodeError>
1255
186k
        where
1256
186k
            K: Default + Eq + Hash + Ord,
1257
186k
            V: Default,
1258
186k
            B: Buf,
1259
186k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
186k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
186k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
186k
        }
prost::encoding::btree_map::merge::<alloc::string::String, alloc::vec::Vec<u8>, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::bytes::merge<alloc::vec::Vec<u8>, &mut &[u8]>>
Line
Count
Source
1248
216k
        pub fn merge<K, V, B, KM, VM>(
1249
216k
            key_merge: KM,
1250
216k
            val_merge: VM,
1251
216k
            values: &mut $map_ty<K, V>,
1252
216k
            buf: &mut B,
1253
216k
            ctx: DecodeContext,
1254
216k
        ) -> Result<(), DecodeError>
1255
216k
        where
1256
216k
            K: Default + Eq + Hash + Ord,
1257
216k
            V: Default,
1258
216k
            B: Buf,
1259
216k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
216k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
216k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
216k
        }
prost::encoding::btree_map::merge::<alloc::string::String, prost_types::Value, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<prost_types::Value, &mut &[u8]>>
Line
Count
Source
1248
193k
        pub fn merge<K, V, B, KM, VM>(
1249
193k
            key_merge: KM,
1250
193k
            val_merge: VM,
1251
193k
            values: &mut $map_ty<K, V>,
1252
193k
            buf: &mut B,
1253
193k
            ctx: DecodeContext,
1254
193k
        ) -> Result<(), DecodeError>
1255
193k
        where
1256
193k
            K: Default + Eq + Hash + Ord,
1257
193k
            V: Default,
1258
193k
            B: Buf,
1259
193k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
193k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
193k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
193k
        }
prost::encoding::btree_map::merge::<alloc::string::String, protobuf::test_messages::proto3::ForeignMessage, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto3::ForeignMessage, &mut &[u8]>>
Line
Count
Source
1248
203k
        pub fn merge<K, V, B, KM, VM>(
1249
203k
            key_merge: KM,
1250
203k
            val_merge: VM,
1251
203k
            values: &mut $map_ty<K, V>,
1252
203k
            buf: &mut B,
1253
203k
            ctx: DecodeContext,
1254
203k
        ) -> Result<(), DecodeError>
1255
203k
        where
1256
203k
            K: Default + Eq + Hash + Ord,
1257
203k
            V: Default,
1258
203k
            B: Buf,
1259
203k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
203k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
203k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
203k
        }
prost::encoding::btree_map::merge::<alloc::string::String, protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, &mut &[u8]>>
Line
Count
Source
1248
278k
        pub fn merge<K, V, B, KM, VM>(
1249
278k
            key_merge: KM,
1250
278k
            val_merge: VM,
1251
278k
            values: &mut $map_ty<K, V>,
1252
278k
            buf: &mut B,
1253
278k
            ctx: DecodeContext,
1254
278k
        ) -> Result<(), DecodeError>
1255
278k
        where
1256
278k
            K: Default + Eq + Hash + Ord,
1257
278k
            V: Default,
1258
278k
            B: Buf,
1259
278k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
278k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
278k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
278k
        }
prost::encoding::btree_map::merge::<bool, bool, &mut &[u8], prost::encoding::bool::merge<&mut &[u8]>, prost::encoding::bool::merge<&mut &[u8]>>
Line
Count
Source
1248
21.2k
        pub fn merge<K, V, B, KM, VM>(
1249
21.2k
            key_merge: KM,
1250
21.2k
            val_merge: VM,
1251
21.2k
            values: &mut $map_ty<K, V>,
1252
21.2k
            buf: &mut B,
1253
21.2k
            ctx: DecodeContext,
1254
21.2k
        ) -> Result<(), DecodeError>
1255
21.2k
        where
1256
21.2k
            K: Default + Eq + Hash + Ord,
1257
21.2k
            V: Default,
1258
21.2k
            B: Buf,
1259
21.2k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
21.2k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
21.2k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
21.2k
        }
prost::encoding::btree_map::merge::<i32, f64, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::double::merge<&mut &[u8]>>
Line
Count
Source
1248
182k
        pub fn merge<K, V, B, KM, VM>(
1249
182k
            key_merge: KM,
1250
182k
            val_merge: VM,
1251
182k
            values: &mut $map_ty<K, V>,
1252
182k
            buf: &mut B,
1253
182k
            ctx: DecodeContext,
1254
182k
        ) -> Result<(), DecodeError>
1255
182k
        where
1256
182k
            K: Default + Eq + Hash + Ord,
1257
182k
            V: Default,
1258
182k
            B: Buf,
1259
182k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
182k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
182k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
182k
        }
prost::encoding::btree_map::merge::<i32, f32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::float::merge<&mut &[u8]>>
Line
Count
Source
1248
97.4k
        pub fn merge<K, V, B, KM, VM>(
1249
97.4k
            key_merge: KM,
1250
97.4k
            val_merge: VM,
1251
97.4k
            values: &mut $map_ty<K, V>,
1252
97.4k
            buf: &mut B,
1253
97.4k
            ctx: DecodeContext,
1254
97.4k
        ) -> Result<(), DecodeError>
1255
97.4k
        where
1256
97.4k
            K: Default + Eq + Hash + Ord,
1257
97.4k
            V: Default,
1258
97.4k
            B: Buf,
1259
97.4k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
97.4k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
97.4k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
97.4k
        }
prost::encoding::btree_map::merge::<i32, i32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>
Line
Count
Source
1248
9.13k
        pub fn merge<K, V, B, KM, VM>(
1249
9.13k
            key_merge: KM,
1250
9.13k
            val_merge: VM,
1251
9.13k
            values: &mut $map_ty<K, V>,
1252
9.13k
            buf: &mut B,
1253
9.13k
            ctx: DecodeContext,
1254
9.13k
        ) -> Result<(), DecodeError>
1255
9.13k
        where
1256
9.13k
            K: Default + Eq + Hash + Ord,
1257
9.13k
            V: Default,
1258
9.13k
            B: Buf,
1259
9.13k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
9.13k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
9.13k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
9.13k
        }
prost::encoding::btree_map::merge::<i32, i32, &mut &[u8], prost::encoding::sint32::merge<&mut &[u8]>, prost::encoding::sint32::merge<&mut &[u8]>>
Line
Count
Source
1248
14.0k
        pub fn merge<K, V, B, KM, VM>(
1249
14.0k
            key_merge: KM,
1250
14.0k
            val_merge: VM,
1251
14.0k
            values: &mut $map_ty<K, V>,
1252
14.0k
            buf: &mut B,
1253
14.0k
            ctx: DecodeContext,
1254
14.0k
        ) -> Result<(), DecodeError>
1255
14.0k
        where
1256
14.0k
            K: Default + Eq + Hash + Ord,
1257
14.0k
            V: Default,
1258
14.0k
            B: Buf,
1259
14.0k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
14.0k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
14.0k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
14.0k
        }
prost::encoding::btree_map::merge::<i32, i32, &mut &[u8], prost::encoding::sfixed32::merge<&mut &[u8]>, prost::encoding::sfixed32::merge<&mut &[u8]>>
Line
Count
Source
1248
143k
        pub fn merge<K, V, B, KM, VM>(
1249
143k
            key_merge: KM,
1250
143k
            val_merge: VM,
1251
143k
            values: &mut $map_ty<K, V>,
1252
143k
            buf: &mut B,
1253
143k
            ctx: DecodeContext,
1254
143k
        ) -> Result<(), DecodeError>
1255
143k
        where
1256
143k
            K: Default + Eq + Hash + Ord,
1257
143k
            V: Default,
1258
143k
            B: Buf,
1259
143k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
143k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
143k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
143k
        }
prost::encoding::btree_map::merge::<u32, u32, &mut &[u8], prost::encoding::uint32::merge<&mut &[u8]>, prost::encoding::uint32::merge<&mut &[u8]>>
Line
Count
Source
1248
35.4k
        pub fn merge<K, V, B, KM, VM>(
1249
35.4k
            key_merge: KM,
1250
35.4k
            val_merge: VM,
1251
35.4k
            values: &mut $map_ty<K, V>,
1252
35.4k
            buf: &mut B,
1253
35.4k
            ctx: DecodeContext,
1254
35.4k
        ) -> Result<(), DecodeError>
1255
35.4k
        where
1256
35.4k
            K: Default + Eq + Hash + Ord,
1257
35.4k
            V: Default,
1258
35.4k
            B: Buf,
1259
35.4k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
35.4k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
35.4k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
35.4k
        }
prost::encoding::btree_map::merge::<u32, u32, &mut &[u8], prost::encoding::fixed32::merge<&mut &[u8]>, prost::encoding::fixed32::merge<&mut &[u8]>>
Line
Count
Source
1248
208k
        pub fn merge<K, V, B, KM, VM>(
1249
208k
            key_merge: KM,
1250
208k
            val_merge: VM,
1251
208k
            values: &mut $map_ty<K, V>,
1252
208k
            buf: &mut B,
1253
208k
            ctx: DecodeContext,
1254
208k
        ) -> Result<(), DecodeError>
1255
208k
        where
1256
208k
            K: Default + Eq + Hash + Ord,
1257
208k
            V: Default,
1258
208k
            B: Buf,
1259
208k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
208k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
208k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
208k
        }
prost::encoding::btree_map::merge::<i64, i64, &mut &[u8], prost::encoding::int64::merge<&mut &[u8]>, prost::encoding::int64::merge<&mut &[u8]>>
Line
Count
Source
1248
17.7k
        pub fn merge<K, V, B, KM, VM>(
1249
17.7k
            key_merge: KM,
1250
17.7k
            val_merge: VM,
1251
17.7k
            values: &mut $map_ty<K, V>,
1252
17.7k
            buf: &mut B,
1253
17.7k
            ctx: DecodeContext,
1254
17.7k
        ) -> Result<(), DecodeError>
1255
17.7k
        where
1256
17.7k
            K: Default + Eq + Hash + Ord,
1257
17.7k
            V: Default,
1258
17.7k
            B: Buf,
1259
17.7k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
17.7k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
17.7k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
17.7k
        }
prost::encoding::btree_map::merge::<i64, i64, &mut &[u8], prost::encoding::sint64::merge<&mut &[u8]>, prost::encoding::sint64::merge<&mut &[u8]>>
Line
Count
Source
1248
61.2k
        pub fn merge<K, V, B, KM, VM>(
1249
61.2k
            key_merge: KM,
1250
61.2k
            val_merge: VM,
1251
61.2k
            values: &mut $map_ty<K, V>,
1252
61.2k
            buf: &mut B,
1253
61.2k
            ctx: DecodeContext,
1254
61.2k
        ) -> Result<(), DecodeError>
1255
61.2k
        where
1256
61.2k
            K: Default + Eq + Hash + Ord,
1257
61.2k
            V: Default,
1258
61.2k
            B: Buf,
1259
61.2k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
61.2k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
61.2k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
61.2k
        }
prost::encoding::btree_map::merge::<i64, i64, &mut &[u8], prost::encoding::sfixed64::merge<&mut &[u8]>, prost::encoding::sfixed64::merge<&mut &[u8]>>
Line
Count
Source
1248
296k
        pub fn merge<K, V, B, KM, VM>(
1249
296k
            key_merge: KM,
1250
296k
            val_merge: VM,
1251
296k
            values: &mut $map_ty<K, V>,
1252
296k
            buf: &mut B,
1253
296k
            ctx: DecodeContext,
1254
296k
        ) -> Result<(), DecodeError>
1255
296k
        where
1256
296k
            K: Default + Eq + Hash + Ord,
1257
296k
            V: Default,
1258
296k
            B: Buf,
1259
296k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
296k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
296k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
296k
        }
prost::encoding::btree_map::merge::<u64, u64, &mut &[u8], prost::encoding::uint64::merge<&mut &[u8]>, prost::encoding::uint64::merge<&mut &[u8]>>
Line
Count
Source
1248
50.6k
        pub fn merge<K, V, B, KM, VM>(
1249
50.6k
            key_merge: KM,
1250
50.6k
            val_merge: VM,
1251
50.6k
            values: &mut $map_ty<K, V>,
1252
50.6k
            buf: &mut B,
1253
50.6k
            ctx: DecodeContext,
1254
50.6k
        ) -> Result<(), DecodeError>
1255
50.6k
        where
1256
50.6k
            K: Default + Eq + Hash + Ord,
1257
50.6k
            V: Default,
1258
50.6k
            B: Buf,
1259
50.6k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
50.6k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
50.6k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
50.6k
        }
prost::encoding::btree_map::merge::<u64, u64, &mut &[u8], prost::encoding::fixed64::merge<&mut &[u8]>, prost::encoding::fixed64::merge<&mut &[u8]>>
Line
Count
Source
1248
159k
        pub fn merge<K, V, B, KM, VM>(
1249
159k
            key_merge: KM,
1250
159k
            val_merge: VM,
1251
159k
            values: &mut $map_ty<K, V>,
1252
159k
            buf: &mut B,
1253
159k
            ctx: DecodeContext,
1254
159k
        ) -> Result<(), DecodeError>
1255
159k
        where
1256
159k
            K: Default + Eq + Hash + Ord,
1257
159k
            V: Default,
1258
159k
            B: Buf,
1259
159k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
159k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
159k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
159k
        }
Unexecuted instantiation: prost::encoding::hash_map::merge::<_, _, _, _, _>
Unexecuted instantiation: prost::encoding::btree_map::merge::<_, _, _, _, _>
prost::encoding::btree_map::merge::<alloc::string::String, alloc::string::String, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::string::merge<&mut &[u8]>>
Line
Count
Source
1248
151k
        pub fn merge<K, V, B, KM, VM>(
1249
151k
            key_merge: KM,
1250
151k
            val_merge: VM,
1251
151k
            values: &mut $map_ty<K, V>,
1252
151k
            buf: &mut B,
1253
151k
            ctx: DecodeContext,
1254
151k
        ) -> Result<(), DecodeError>
1255
151k
        where
1256
151k
            K: Default + Eq + Hash + Ord,
1257
151k
            V: Default,
1258
151k
            B: Buf,
1259
151k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
151k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
151k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
151k
        }
prost::encoding::btree_map::merge::<alloc::string::String, alloc::vec::Vec<u8>, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::bytes::merge<alloc::vec::Vec<u8>, &mut &[u8]>>
Line
Count
Source
1248
226k
        pub fn merge<K, V, B, KM, VM>(
1249
226k
            key_merge: KM,
1250
226k
            val_merge: VM,
1251
226k
            values: &mut $map_ty<K, V>,
1252
226k
            buf: &mut B,
1253
226k
            ctx: DecodeContext,
1254
226k
        ) -> Result<(), DecodeError>
1255
226k
        where
1256
226k
            K: Default + Eq + Hash + Ord,
1257
226k
            V: Default,
1258
226k
            B: Buf,
1259
226k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
226k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
226k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
226k
        }
prost::encoding::btree_map::merge::<alloc::string::String, protobuf::test_messages::proto2::ForeignMessageProto2, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto2::ForeignMessageProto2, &mut &[u8]>>
Line
Count
Source
1248
165k
        pub fn merge<K, V, B, KM, VM>(
1249
165k
            key_merge: KM,
1250
165k
            val_merge: VM,
1251
165k
            values: &mut $map_ty<K, V>,
1252
165k
            buf: &mut B,
1253
165k
            ctx: DecodeContext,
1254
165k
        ) -> Result<(), DecodeError>
1255
165k
        where
1256
165k
            K: Default + Eq + Hash + Ord,
1257
165k
            V: Default,
1258
165k
            B: Buf,
1259
165k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
165k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
165k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
165k
        }
prost::encoding::btree_map::merge::<alloc::string::String, protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, &mut &[u8]>>
Line
Count
Source
1248
249k
        pub fn merge<K, V, B, KM, VM>(
1249
249k
            key_merge: KM,
1250
249k
            val_merge: VM,
1251
249k
            values: &mut $map_ty<K, V>,
1252
249k
            buf: &mut B,
1253
249k
            ctx: DecodeContext,
1254
249k
        ) -> Result<(), DecodeError>
1255
249k
        where
1256
249k
            K: Default + Eq + Hash + Ord,
1257
249k
            V: Default,
1258
249k
            B: Buf,
1259
249k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
249k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
249k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
249k
        }
prost::encoding::btree_map::merge::<bool, bool, &mut &[u8], prost::encoding::bool::merge<&mut &[u8]>, prost::encoding::bool::merge<&mut &[u8]>>
Line
Count
Source
1248
11.7k
        pub fn merge<K, V, B, KM, VM>(
1249
11.7k
            key_merge: KM,
1250
11.7k
            val_merge: VM,
1251
11.7k
            values: &mut $map_ty<K, V>,
1252
11.7k
            buf: &mut B,
1253
11.7k
            ctx: DecodeContext,
1254
11.7k
        ) -> Result<(), DecodeError>
1255
11.7k
        where
1256
11.7k
            K: Default + Eq + Hash + Ord,
1257
11.7k
            V: Default,
1258
11.7k
            B: Buf,
1259
11.7k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
11.7k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
11.7k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
11.7k
        }
prost::encoding::btree_map::merge::<i32, f64, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::double::merge<&mut &[u8]>>
Line
Count
Source
1248
167k
        pub fn merge<K, V, B, KM, VM>(
1249
167k
            key_merge: KM,
1250
167k
            val_merge: VM,
1251
167k
            values: &mut $map_ty<K, V>,
1252
167k
            buf: &mut B,
1253
167k
            ctx: DecodeContext,
1254
167k
        ) -> Result<(), DecodeError>
1255
167k
        where
1256
167k
            K: Default + Eq + Hash + Ord,
1257
167k
            V: Default,
1258
167k
            B: Buf,
1259
167k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
167k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
167k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
167k
        }
prost::encoding::btree_map::merge::<i32, f32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::float::merge<&mut &[u8]>>
Line
Count
Source
1248
170k
        pub fn merge<K, V, B, KM, VM>(
1249
170k
            key_merge: KM,
1250
170k
            val_merge: VM,
1251
170k
            values: &mut $map_ty<K, V>,
1252
170k
            buf: &mut B,
1253
170k
            ctx: DecodeContext,
1254
170k
        ) -> Result<(), DecodeError>
1255
170k
        where
1256
170k
            K: Default + Eq + Hash + Ord,
1257
170k
            V: Default,
1258
170k
            B: Buf,
1259
170k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
170k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
170k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
170k
        }
prost::encoding::btree_map::merge::<i32, i32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>
Line
Count
Source
1248
8.08k
        pub fn merge<K, V, B, KM, VM>(
1249
8.08k
            key_merge: KM,
1250
8.08k
            val_merge: VM,
1251
8.08k
            values: &mut $map_ty<K, V>,
1252
8.08k
            buf: &mut B,
1253
8.08k
            ctx: DecodeContext,
1254
8.08k
        ) -> Result<(), DecodeError>
1255
8.08k
        where
1256
8.08k
            K: Default + Eq + Hash + Ord,
1257
8.08k
            V: Default,
1258
8.08k
            B: Buf,
1259
8.08k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
8.08k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
8.08k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
8.08k
        }
prost::encoding::btree_map::merge::<i32, i32, &mut &[u8], prost::encoding::sint32::merge<&mut &[u8]>, prost::encoding::sint32::merge<&mut &[u8]>>
Line
Count
Source
1248
37.6k
        pub fn merge<K, V, B, KM, VM>(
1249
37.6k
            key_merge: KM,
1250
37.6k
            val_merge: VM,
1251
37.6k
            values: &mut $map_ty<K, V>,
1252
37.6k
            buf: &mut B,
1253
37.6k
            ctx: DecodeContext,
1254
37.6k
        ) -> Result<(), DecodeError>
1255
37.6k
        where
1256
37.6k
            K: Default + Eq + Hash + Ord,
1257
37.6k
            V: Default,
1258
37.6k
            B: Buf,
1259
37.6k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
37.6k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
37.6k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
37.6k
        }
prost::encoding::btree_map::merge::<i32, i32, &mut &[u8], prost::encoding::sfixed32::merge<&mut &[u8]>, prost::encoding::sfixed32::merge<&mut &[u8]>>
Line
Count
Source
1248
166k
        pub fn merge<K, V, B, KM, VM>(
1249
166k
            key_merge: KM,
1250
166k
            val_merge: VM,
1251
166k
            values: &mut $map_ty<K, V>,
1252
166k
            buf: &mut B,
1253
166k
            ctx: DecodeContext,
1254
166k
        ) -> Result<(), DecodeError>
1255
166k
        where
1256
166k
            K: Default + Eq + Hash + Ord,
1257
166k
            V: Default,
1258
166k
            B: Buf,
1259
166k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
166k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
166k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
166k
        }
prost::encoding::btree_map::merge::<u32, u32, &mut &[u8], prost::encoding::uint32::merge<&mut &[u8]>, prost::encoding::uint32::merge<&mut &[u8]>>
Line
Count
Source
1248
14.3k
        pub fn merge<K, V, B, KM, VM>(
1249
14.3k
            key_merge: KM,
1250
14.3k
            val_merge: VM,
1251
14.3k
            values: &mut $map_ty<K, V>,
1252
14.3k
            buf: &mut B,
1253
14.3k
            ctx: DecodeContext,
1254
14.3k
        ) -> Result<(), DecodeError>
1255
14.3k
        where
1256
14.3k
            K: Default + Eq + Hash + Ord,
1257
14.3k
            V: Default,
1258
14.3k
            B: Buf,
1259
14.3k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
14.3k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
14.3k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
14.3k
        }
prost::encoding::btree_map::merge::<u32, u32, &mut &[u8], prost::encoding::fixed32::merge<&mut &[u8]>, prost::encoding::fixed32::merge<&mut &[u8]>>
Line
Count
Source
1248
255k
        pub fn merge<K, V, B, KM, VM>(
1249
255k
            key_merge: KM,
1250
255k
            val_merge: VM,
1251
255k
            values: &mut $map_ty<K, V>,
1252
255k
            buf: &mut B,
1253
255k
            ctx: DecodeContext,
1254
255k
        ) -> Result<(), DecodeError>
1255
255k
        where
1256
255k
            K: Default + Eq + Hash + Ord,
1257
255k
            V: Default,
1258
255k
            B: Buf,
1259
255k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
255k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
255k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
255k
        }
prost::encoding::btree_map::merge::<i64, i64, &mut &[u8], prost::encoding::int64::merge<&mut &[u8]>, prost::encoding::int64::merge<&mut &[u8]>>
Line
Count
Source
1248
38.9k
        pub fn merge<K, V, B, KM, VM>(
1249
38.9k
            key_merge: KM,
1250
38.9k
            val_merge: VM,
1251
38.9k
            values: &mut $map_ty<K, V>,
1252
38.9k
            buf: &mut B,
1253
38.9k
            ctx: DecodeContext,
1254
38.9k
        ) -> Result<(), DecodeError>
1255
38.9k
        where
1256
38.9k
            K: Default + Eq + Hash + Ord,
1257
38.9k
            V: Default,
1258
38.9k
            B: Buf,
1259
38.9k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
38.9k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
38.9k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
38.9k
        }
prost::encoding::btree_map::merge::<i64, i64, &mut &[u8], prost::encoding::sint64::merge<&mut &[u8]>, prost::encoding::sint64::merge<&mut &[u8]>>
Line
Count
Source
1248
28.1k
        pub fn merge<K, V, B, KM, VM>(
1249
28.1k
            key_merge: KM,
1250
28.1k
            val_merge: VM,
1251
28.1k
            values: &mut $map_ty<K, V>,
1252
28.1k
            buf: &mut B,
1253
28.1k
            ctx: DecodeContext,
1254
28.1k
        ) -> Result<(), DecodeError>
1255
28.1k
        where
1256
28.1k
            K: Default + Eq + Hash + Ord,
1257
28.1k
            V: Default,
1258
28.1k
            B: Buf,
1259
28.1k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
28.1k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
28.1k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
28.1k
        }
prost::encoding::btree_map::merge::<i64, i64, &mut &[u8], prost::encoding::sfixed64::merge<&mut &[u8]>, prost::encoding::sfixed64::merge<&mut &[u8]>>
Line
Count
Source
1248
196k
        pub fn merge<K, V, B, KM, VM>(
1249
196k
            key_merge: KM,
1250
196k
            val_merge: VM,
1251
196k
            values: &mut $map_ty<K, V>,
1252
196k
            buf: &mut B,
1253
196k
            ctx: DecodeContext,
1254
196k
        ) -> Result<(), DecodeError>
1255
196k
        where
1256
196k
            K: Default + Eq + Hash + Ord,
1257
196k
            V: Default,
1258
196k
            B: Buf,
1259
196k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
196k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
196k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
196k
        }
prost::encoding::btree_map::merge::<u64, u64, &mut &[u8], prost::encoding::uint64::merge<&mut &[u8]>, prost::encoding::uint64::merge<&mut &[u8]>>
Line
Count
Source
1248
76.9k
        pub fn merge<K, V, B, KM, VM>(
1249
76.9k
            key_merge: KM,
1250
76.9k
            val_merge: VM,
1251
76.9k
            values: &mut $map_ty<K, V>,
1252
76.9k
            buf: &mut B,
1253
76.9k
            ctx: DecodeContext,
1254
76.9k
        ) -> Result<(), DecodeError>
1255
76.9k
        where
1256
76.9k
            K: Default + Eq + Hash + Ord,
1257
76.9k
            V: Default,
1258
76.9k
            B: Buf,
1259
76.9k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
76.9k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
76.9k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
76.9k
        }
prost::encoding::btree_map::merge::<u64, u64, &mut &[u8], prost::encoding::fixed64::merge<&mut &[u8]>, prost::encoding::fixed64::merge<&mut &[u8]>>
Line
Count
Source
1248
173k
        pub fn merge<K, V, B, KM, VM>(
1249
173k
            key_merge: KM,
1250
173k
            val_merge: VM,
1251
173k
            values: &mut $map_ty<K, V>,
1252
173k
            buf: &mut B,
1253
173k
            ctx: DecodeContext,
1254
173k
        ) -> Result<(), DecodeError>
1255
173k
        where
1256
173k
            K: Default + Eq + Hash + Ord,
1257
173k
            V: Default,
1258
173k
            B: Buf,
1259
173k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1260
173k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1261
        {
1262
173k
            merge_with_default(key_merge, val_merge, V::default(), values, buf, ctx)
1263
173k
        }
1264
1265
        /// Generic protobuf map encode function.
1266
38.2M
        pub fn encoded_len<K, V, KL, VL>(
1267
38.2M
            key_encoded_len: KL,
1268
38.2M
            val_encoded_len: VL,
1269
38.2M
            tag: u32,
1270
38.2M
            values: &$map_ty<K, V>,
1271
38.2M
        ) -> usize
1272
38.2M
        where
1273
38.2M
            K: Default + Eq + Hash + Ord,
1274
38.2M
            V: Default + PartialEq,
1275
38.2M
            KL: Fn(u32, &K) -> usize,
1276
38.2M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
38.2M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
38.2M
        }
prost::encoding::btree_map::encoded_len::<alloc::string::String, alloc::string::String, prost::encoding::string::encoded_len, prost::encoding::string::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<alloc::string::String, alloc::vec::Vec<u8>, prost::encoding::string::encoded_len, prost::encoding::bytes::encoded_len<alloc::vec::Vec<u8>>>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<alloc::string::String, prost_types::Value, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<prost_types::Value>>
Line
Count
Source
1266
325k
        pub fn encoded_len<K, V, KL, VL>(
1267
325k
            key_encoded_len: KL,
1268
325k
            val_encoded_len: VL,
1269
325k
            tag: u32,
1270
325k
            values: &$map_ty<K, V>,
1271
325k
        ) -> usize
1272
325k
        where
1273
325k
            K: Default + Eq + Hash + Ord,
1274
325k
            V: Default + PartialEq,
1275
325k
            KL: Fn(u32, &K) -> usize,
1276
325k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
325k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
325k
        }
prost::encoding::btree_map::encoded_len::<alloc::string::String, protobuf::test_messages::proto3::ForeignMessage, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<protobuf::test_messages::proto3::ForeignMessage>>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<alloc::string::String, protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<bool, bool, prost::encoding::bool::encoded_len, prost::encoding::bool::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<i32, f64, prost::encoding::int32::encoded_len, prost::encoding::double::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<i32, f32, prost::encoding::int32::encoded_len, prost::encoding::float::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<i32, i32, prost::encoding::int32::encoded_len, prost::encoding::int32::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<i32, i32, prost::encoding::sint32::encoded_len, prost::encoding::sint32::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<i32, i32, prost::encoding::sfixed32::encoded_len, prost::encoding::sfixed32::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<u32, u32, prost::encoding::uint32::encoded_len, prost::encoding::uint32::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<u32, u32, prost::encoding::fixed32::encoded_len, prost::encoding::fixed32::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<i64, i64, prost::encoding::int64::encoded_len, prost::encoding::int64::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<i64, i64, prost::encoding::sint64::encoded_len, prost::encoding::sint64::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<i64, i64, prost::encoding::sfixed64::encoded_len, prost::encoding::sfixed64::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<u64, u64, prost::encoding::uint64::encoded_len, prost::encoding::uint64::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
prost::encoding::btree_map::encoded_len::<u64, u64, prost::encoding::fixed64::encoded_len, prost::encoding::fixed64::encoded_len>
Line
Count
Source
1266
1.43M
        pub fn encoded_len<K, V, KL, VL>(
1267
1.43M
            key_encoded_len: KL,
1268
1.43M
            val_encoded_len: VL,
1269
1.43M
            tag: u32,
1270
1.43M
            values: &$map_ty<K, V>,
1271
1.43M
        ) -> usize
1272
1.43M
        where
1273
1.43M
            K: Default + Eq + Hash + Ord,
1274
1.43M
            V: Default + PartialEq,
1275
1.43M
            KL: Fn(u32, &K) -> usize,
1276
1.43M
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
1.43M
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
1.43M
        }
Unexecuted instantiation: prost::encoding::hash_map::encoded_len::<_, _, _, _>
Unexecuted instantiation: prost::encoding::btree_map::encoded_len::<_, _, _, _>
prost::encoding::btree_map::encoded_len::<alloc::string::String, alloc::string::String, prost::encoding::string::encoded_len, prost::encoding::string::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<alloc::string::String, alloc::vec::Vec<u8>, prost::encoding::string::encoded_len, prost::encoding::bytes::encoded_len<alloc::vec::Vec<u8>>>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<alloc::string::String, protobuf::test_messages::proto2::ForeignMessageProto2, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<protobuf::test_messages::proto2::ForeignMessageProto2>>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<alloc::string::String, protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<bool, bool, prost::encoding::bool::encoded_len, prost::encoding::bool::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<i32, f64, prost::encoding::int32::encoded_len, prost::encoding::double::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<i32, f32, prost::encoding::int32::encoded_len, prost::encoding::float::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<i32, i32, prost::encoding::int32::encoded_len, prost::encoding::int32::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<i32, i32, prost::encoding::sint32::encoded_len, prost::encoding::sint32::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<i32, i32, prost::encoding::sfixed32::encoded_len, prost::encoding::sfixed32::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<u32, u32, prost::encoding::uint32::encoded_len, prost::encoding::uint32::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<u32, u32, prost::encoding::fixed32::encoded_len, prost::encoding::fixed32::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<i64, i64, prost::encoding::int64::encoded_len, prost::encoding::int64::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<i64, i64, prost::encoding::sint64::encoded_len, prost::encoding::sint64::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<i64, i64, prost::encoding::sfixed64::encoded_len, prost::encoding::sfixed64::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<u64, u64, prost::encoding::uint64::encoded_len, prost::encoding::uint64::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
prost::encoding::btree_map::encoded_len::<u64, u64, prost::encoding::fixed64::encoded_len, prost::encoding::fixed64::encoded_len>
Line
Count
Source
1266
800k
        pub fn encoded_len<K, V, KL, VL>(
1267
800k
            key_encoded_len: KL,
1268
800k
            val_encoded_len: VL,
1269
800k
            tag: u32,
1270
800k
            values: &$map_ty<K, V>,
1271
800k
        ) -> usize
1272
800k
        where
1273
800k
            K: Default + Eq + Hash + Ord,
1274
800k
            V: Default + PartialEq,
1275
800k
            KL: Fn(u32, &K) -> usize,
1276
800k
            VL: Fn(u32, &V) -> usize,
1277
        {
1278
800k
            encoded_len_with_default(key_encoded_len, val_encoded_len, &V::default(), tag, values)
1279
800k
        }
1280
1281
        /// Generic protobuf map encode function with an overriden value default.
1282
        ///
1283
        /// This is necessary because enumeration values can have a default value other
1284
        /// than 0 in proto2.
1285
11.9M
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
11.9M
            key_encode: KE,
1287
11.9M
            key_encoded_len: KL,
1288
11.9M
            val_encode: VE,
1289
11.9M
            val_encoded_len: VL,
1290
11.9M
            val_default: &V,
1291
11.9M
            tag: u32,
1292
11.9M
            values: &$map_ty<K, V>,
1293
11.9M
            buf: &mut B,
1294
11.9M
        ) where
1295
11.9M
            K: Default + Eq + Hash + Ord,
1296
11.9M
            V: PartialEq,
1297
11.9M
            B: BufMut,
1298
11.9M
            KE: Fn(u32, &K, &mut B),
1299
11.9M
            KL: Fn(u32, &K) -> usize,
1300
11.9M
            VE: Fn(u32, &V, &mut B),
1301
11.9M
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
11.9M
            for (key, val) in values.iter() {
1304
816k
                let skip_key = key == &K::default();
1305
816k
                let skip_val = val == val_default;
1306
1307
816k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
816k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
816k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
816k
                encode_varint(len as u64, buf);
1312
816k
                if !skip_key {
1313
539k
                    key_encode(1, key, buf);
1314
539k
                }
1315
816k
                if !skip_val {
1316
63.0k
                    val_encode(2, val, buf);
1317
753k
                }
1318
            }
1319
11.9M
        }
prost::encoding::btree_map::encode_with_default::<alloc::string::String, alloc::string::String, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
53.5k
                let skip_key = key == &K::default();
1305
53.5k
                let skip_val = val == val_default;
1306
1307
53.5k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
53.5k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
53.5k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
53.5k
                encode_varint(len as u64, buf);
1312
53.5k
                if !skip_key {
1313
11.7k
                    key_encode(1, key, buf);
1314
41.7k
                }
1315
53.5k
                if !skip_val {
1316
1.42k
                    val_encode(2, val, buf);
1317
52.0k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<alloc::string::String, alloc::vec::Vec<u8>, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::bytes::encode<alloc::vec::Vec<u8>, alloc::vec::Vec<u8>>, prost::encoding::bytes::encoded_len<alloc::vec::Vec<u8>>>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
36.4k
                let skip_key = key == &K::default();
1305
36.4k
                let skip_val = val == val_default;
1306
1307
36.4k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
36.4k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
36.4k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
36.4k
                encode_varint(len as u64, buf);
1312
36.4k
                if !skip_key {
1313
26.8k
                    key_encode(1, key, buf);
1314
26.8k
                }
1315
36.4k
                if !skip_val {
1316
2.45k
                    val_encode(2, val, buf);
1317
34.0k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<alloc::string::String, prost_types::Value, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::message::encode<prost_types::Value, alloc::vec::Vec<u8>>, prost::encoding::message::encoded_len<prost_types::Value>>
Line
Count
Source
1285
109k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
109k
            key_encode: KE,
1287
109k
            key_encoded_len: KL,
1288
109k
            val_encode: VE,
1289
109k
            val_encoded_len: VL,
1290
109k
            val_default: &V,
1291
109k
            tag: u32,
1292
109k
            values: &$map_ty<K, V>,
1293
109k
            buf: &mut B,
1294
109k
        ) where
1295
109k
            K: Default + Eq + Hash + Ord,
1296
109k
            V: PartialEq,
1297
109k
            B: BufMut,
1298
109k
            KE: Fn(u32, &K, &mut B),
1299
109k
            KL: Fn(u32, &K) -> usize,
1300
109k
            VE: Fn(u32, &V, &mut B),
1301
109k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
109k
            for (key, val) in values.iter() {
1304
25.3k
                let skip_key = key == &K::default();
1305
25.3k
                let skip_val = val == val_default;
1306
1307
25.3k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
25.3k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
25.3k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
25.3k
                encode_varint(len as u64, buf);
1312
25.3k
                if !skip_key {
1313
15.5k
                    key_encode(1, key, buf);
1314
15.5k
                }
1315
25.3k
                if !skip_val {
1316
6.07k
                    val_encode(2, val, buf);
1317
19.2k
                }
1318
            }
1319
109k
        }
prost::encoding::btree_map::encode_with_default::<alloc::string::String, protobuf::test_messages::proto3::ForeignMessage, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::message::encode<protobuf::test_messages::proto3::ForeignMessage, alloc::vec::Vec<u8>>, prost::encoding::message::encoded_len<protobuf::test_messages::proto3::ForeignMessage>>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
28.5k
                let skip_key = key == &K::default();
1305
28.5k
                let skip_val = val == val_default;
1306
1307
28.5k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
28.5k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
28.5k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
28.5k
                encode_varint(len as u64, buf);
1312
28.5k
                if !skip_key {
1313
17.2k
                    key_encode(1, key, buf);
1314
17.2k
                }
1315
28.5k
                if !skip_val {
1316
794
                    val_encode(2, val, buf);
1317
27.7k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<alloc::string::String, protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::message::encode<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, alloc::vec::Vec<u8>>, prost::encoding::message::encoded_len<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
32.4k
                let skip_key = key == &K::default();
1305
32.4k
                let skip_val = val == val_default;
1306
1307
32.4k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
32.4k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
32.4k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
32.4k
                encode_varint(len as u64, buf);
1312
32.4k
                if !skip_key {
1313
26.0k
                    key_encode(1, key, buf);
1314
26.0k
                }
1315
32.4k
                if !skip_val {
1316
2.35k
                    val_encode(2, val, buf);
1317
30.0k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<alloc::string::String, i32, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len>
Line
Count
Source
1285
787k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
787k
            key_encode: KE,
1287
787k
            key_encoded_len: KL,
1288
787k
            val_encode: VE,
1289
787k
            val_encoded_len: VL,
1290
787k
            val_default: &V,
1291
787k
            tag: u32,
1292
787k
            values: &$map_ty<K, V>,
1293
787k
            buf: &mut B,
1294
787k
        ) where
1295
787k
            K: Default + Eq + Hash + Ord,
1296
787k
            V: PartialEq,
1297
787k
            B: BufMut,
1298
787k
            KE: Fn(u32, &K, &mut B),
1299
787k
            KL: Fn(u32, &K) -> usize,
1300
787k
            VE: Fn(u32, &V, &mut B),
1301
787k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
787k
            for (key, val) in values.iter() {
1304
36.9k
                let skip_key = key == &K::default();
1305
36.9k
                let skip_val = val == val_default;
1306
1307
36.9k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
36.9k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
36.9k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
36.9k
                encode_varint(len as u64, buf);
1312
36.9k
                if !skip_key {
1313
22.1k
                    key_encode(1, key, buf);
1314
22.1k
                }
1315
36.9k
                if !skip_val {
1316
700
                    val_encode(2, val, buf);
1317
36.2k
                }
1318
            }
1319
787k
        }
prost::encoding::btree_map::encode_with_default::<bool, bool, alloc::vec::Vec<u8>, prost::encoding::bool::encode<alloc::vec::Vec<u8>>, prost::encoding::bool::encoded_len, prost::encoding::bool::encode<alloc::vec::Vec<u8>>, prost::encoding::bool::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
12.9k
                let skip_key = key == &K::default();
1305
12.9k
                let skip_val = val == val_default;
1306
1307
12.9k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
12.9k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
12.9k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
12.9k
                encode_varint(len as u64, buf);
1312
12.9k
                if !skip_key {
1313
2.55k
                    key_encode(1, key, buf);
1314
10.3k
                }
1315
12.9k
                if !skip_val {
1316
90
                    val_encode(2, val, buf);
1317
12.8k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<i32, f64, alloc::vec::Vec<u8>, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len, prost::encoding::double::encode<alloc::vec::Vec<u8>>, prost::encoding::double::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
30.8k
                let skip_key = key == &K::default();
1305
30.8k
                let skip_val = val == val_default;
1306
1307
30.8k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
30.8k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
30.8k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
30.8k
                encode_varint(len as u64, buf);
1312
30.8k
                if !skip_key {
1313
21.0k
                    key_encode(1, key, buf);
1314
21.0k
                }
1315
30.8k
                if !skip_val {
1316
218
                    val_encode(2, val, buf);
1317
30.6k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<i32, f32, alloc::vec::Vec<u8>, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len, prost::encoding::float::encode<alloc::vec::Vec<u8>>, prost::encoding::float::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
39.8k
                let skip_key = key == &K::default();
1305
39.8k
                let skip_val = val == val_default;
1306
1307
39.8k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
39.8k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
39.8k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
39.8k
                encode_varint(len as u64, buf);
1312
39.8k
                if !skip_key {
1313
29.2k
                    key_encode(1, key, buf);
1314
29.2k
                }
1315
39.8k
                if !skip_val {
1316
11.3k
                    val_encode(2, val, buf);
1317
28.4k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<i32, i32, alloc::vec::Vec<u8>, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
8.26k
                let skip_key = key == &K::default();
1305
8.26k
                let skip_val = val == val_default;
1306
1307
8.26k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
8.26k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
8.26k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
8.26k
                encode_varint(len as u64, buf);
1312
8.26k
                if !skip_key {
1313
4.82k
                    key_encode(1, key, buf);
1314
4.82k
                }
1315
8.26k
                if !skip_val {
1316
1.26k
                    val_encode(2, val, buf);
1317
7.00k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<i32, i32, alloc::vec::Vec<u8>, prost::encoding::sint32::encode<alloc::vec::Vec<u8>>, prost::encoding::sint32::encoded_len, prost::encoding::sint32::encode<alloc::vec::Vec<u8>>, prost::encoding::sint32::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
9.53k
                let skip_key = key == &K::default();
1305
9.53k
                let skip_val = val == val_default;
1306
1307
9.53k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
9.53k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
9.53k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
9.53k
                encode_varint(len as u64, buf);
1312
9.53k
                if !skip_key {
1313
7.10k
                    key_encode(1, key, buf);
1314
7.10k
                }
1315
9.53k
                if !skip_val {
1316
734
                    val_encode(2, val, buf);
1317
8.80k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<i32, i32, alloc::vec::Vec<u8>, prost::encoding::sfixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed32::encoded_len, prost::encoding::sfixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed32::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
21.8k
                let skip_key = key == &K::default();
1305
21.8k
                let skip_val = val == val_default;
1306
1307
21.8k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
21.8k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
21.8k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
21.8k
                encode_varint(len as u64, buf);
1312
21.8k
                if !skip_key {
1313
7.91k
                    key_encode(1, key, buf);
1314
13.9k
                }
1315
21.8k
                if !skip_val {
1316
4.57k
                    val_encode(2, val, buf);
1317
17.2k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<u32, u32, alloc::vec::Vec<u8>, prost::encoding::uint32::encode<alloc::vec::Vec<u8>>, prost::encoding::uint32::encoded_len, prost::encoding::uint32::encode<alloc::vec::Vec<u8>>, prost::encoding::uint32::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
16.6k
                let skip_key = key == &K::default();
1305
16.6k
                let skip_val = val == val_default;
1306
1307
16.6k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
16.6k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
16.6k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
16.6k
                encode_varint(len as u64, buf);
1312
16.6k
                if !skip_key {
1313
12.8k
                    key_encode(1, key, buf);
1314
12.8k
                }
1315
16.6k
                if !skip_val {
1316
1.58k
                    val_encode(2, val, buf);
1317
15.0k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<u32, u32, alloc::vec::Vec<u8>, prost::encoding::fixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed32::encoded_len, prost::encoding::fixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed32::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
14.0k
                let skip_key = key == &K::default();
1305
14.0k
                let skip_val = val == val_default;
1306
1307
14.0k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
14.0k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
14.0k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
14.0k
                encode_varint(len as u64, buf);
1312
14.0k
                if !skip_key {
1313
7.25k
                    key_encode(1, key, buf);
1314
7.25k
                }
1315
14.0k
                if !skip_val {
1316
426
                    val_encode(2, val, buf);
1317
13.6k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<i64, i64, alloc::vec::Vec<u8>, prost::encoding::int64::encode<alloc::vec::Vec<u8>>, prost::encoding::int64::encoded_len, prost::encoding::int64::encode<alloc::vec::Vec<u8>>, prost::encoding::int64::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
7.53k
                let skip_key = key == &K::default();
1305
7.53k
                let skip_val = val == val_default;
1306
1307
7.53k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
7.53k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
7.53k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
7.53k
                encode_varint(len as u64, buf);
1312
7.53k
                if !skip_key {
1313
2.86k
                    key_encode(1, key, buf);
1314
4.67k
                }
1315
7.53k
                if !skip_val {
1316
658
                    val_encode(2, val, buf);
1317
6.87k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<i64, i64, alloc::vec::Vec<u8>, prost::encoding::sint64::encode<alloc::vec::Vec<u8>>, prost::encoding::sint64::encoded_len, prost::encoding::sint64::encode<alloc::vec::Vec<u8>>, prost::encoding::sint64::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
16.1k
                let skip_key = key == &K::default();
1305
16.1k
                let skip_val = val == val_default;
1306
1307
16.1k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
16.1k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
16.1k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
16.1k
                encode_varint(len as u64, buf);
1312
16.1k
                if !skip_key {
1313
12.5k
                    key_encode(1, key, buf);
1314
12.5k
                }
1315
16.1k
                if !skip_val {
1316
668
                    val_encode(2, val, buf);
1317
15.4k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<i64, i64, alloc::vec::Vec<u8>, prost::encoding::sfixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed64::encoded_len, prost::encoding::sfixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed64::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
18.8k
                let skip_key = key == &K::default();
1305
18.8k
                let skip_val = val == val_default;
1306
1307
18.8k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
18.8k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
18.8k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
18.8k
                encode_varint(len as u64, buf);
1312
18.8k
                if !skip_key {
1313
12.5k
                    key_encode(1, key, buf);
1314
12.5k
                }
1315
18.8k
                if !skip_val {
1316
404
                    val_encode(2, val, buf);
1317
18.4k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<u64, u64, alloc::vec::Vec<u8>, prost::encoding::uint64::encode<alloc::vec::Vec<u8>>, prost::encoding::uint64::encoded_len, prost::encoding::uint64::encode<alloc::vec::Vec<u8>>, prost::encoding::uint64::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
26.4k
                let skip_key = key == &K::default();
1305
26.4k
                let skip_val = val == val_default;
1306
1307
26.4k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
26.4k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
26.4k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
26.4k
                encode_varint(len as u64, buf);
1312
26.4k
                if !skip_key {
1313
13.8k
                    key_encode(1, key, buf);
1314
13.8k
                }
1315
26.4k
                if !skip_val {
1316
632
                    val_encode(2, val, buf);
1317
25.8k
                }
1318
            }
1319
393k
        }
prost::encoding::btree_map::encode_with_default::<u64, u64, alloc::vec::Vec<u8>, prost::encoding::fixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed64::encoded_len, prost::encoding::fixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed64::encoded_len>
Line
Count
Source
1285
393k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
393k
            key_encode: KE,
1287
393k
            key_encoded_len: KL,
1288
393k
            val_encode: VE,
1289
393k
            val_encoded_len: VL,
1290
393k
            val_default: &V,
1291
393k
            tag: u32,
1292
393k
            values: &$map_ty<K, V>,
1293
393k
            buf: &mut B,
1294
393k
        ) where
1295
393k
            K: Default + Eq + Hash + Ord,
1296
393k
            V: PartialEq,
1297
393k
            B: BufMut,
1298
393k
            KE: Fn(u32, &K, &mut B),
1299
393k
            KL: Fn(u32, &K) -> usize,
1300
393k
            VE: Fn(u32, &V, &mut B),
1301
393k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
393k
            for (key, val) in values.iter() {
1304
14.7k
                let skip_key = key == &K::default();
1305
14.7k
                let skip_val = val == val_default;
1306
1307
14.7k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
14.7k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
14.7k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
14.7k
                encode_varint(len as u64, buf);
1312
14.7k
                if !skip_key {
1313
11.1k
                    key_encode(1, key, buf);
1314
11.1k
                }
1315
14.7k
                if !skip_val {
1316
728
                    val_encode(2, val, buf);
1317
14.0k
                }
1318
            }
1319
393k
        }
Unexecuted instantiation: prost::encoding::hash_map::encode_with_default::<_, _, _, _, _, _, _>
Unexecuted instantiation: prost::encoding::btree_map::encode_with_default::<_, _, _, _, _, _, _>
prost::encoding::btree_map::encode_with_default::<alloc::string::String, alloc::string::String, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
21.6k
                let skip_key = key == &K::default();
1305
21.6k
                let skip_val = val == val_default;
1306
1307
21.6k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
21.6k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
21.6k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
21.6k
                encode_varint(len as u64, buf);
1312
21.6k
                if !skip_key {
1313
13.2k
                    key_encode(1, key, buf);
1314
13.2k
                }
1315
21.6k
                if !skip_val {
1316
6.14k
                    val_encode(2, val, buf);
1317
15.5k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<alloc::string::String, alloc::vec::Vec<u8>, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::bytes::encode<alloc::vec::Vec<u8>, alloc::vec::Vec<u8>>, prost::encoding::bytes::encoded_len<alloc::vec::Vec<u8>>>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
19.4k
                let skip_key = key == &K::default();
1305
19.4k
                let skip_val = val == val_default;
1306
1307
19.4k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
19.4k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
19.4k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
19.4k
                encode_varint(len as u64, buf);
1312
19.4k
                if !skip_key {
1313
16.8k
                    key_encode(1, key, buf);
1314
16.8k
                }
1315
19.4k
                if !skip_val {
1316
568
                    val_encode(2, val, buf);
1317
18.8k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<alloc::string::String, protobuf::test_messages::proto2::ForeignMessageProto2, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::message::encode<protobuf::test_messages::proto2::ForeignMessageProto2, alloc::vec::Vec<u8>>, prost::encoding::message::encoded_len<protobuf::test_messages::proto2::ForeignMessageProto2>>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
22.8k
                let skip_key = key == &K::default();
1305
22.8k
                let skip_val = val == val_default;
1306
1307
22.8k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
22.8k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
22.8k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
22.8k
                encode_varint(len as u64, buf);
1312
22.8k
                if !skip_key {
1313
15.8k
                    key_encode(1, key, buf);
1314
15.8k
                }
1315
22.8k
                if !skip_val {
1316
1.25k
                    val_encode(2, val, buf);
1317
21.6k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<alloc::string::String, protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::message::encode<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, alloc::vec::Vec<u8>>, prost::encoding::message::encoded_len<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
40.3k
                let skip_key = key == &K::default();
1305
40.3k
                let skip_val = val == val_default;
1306
1307
40.3k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
40.3k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
40.3k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
40.3k
                encode_varint(len as u64, buf);
1312
40.3k
                if !skip_key {
1313
20.7k
                    key_encode(1, key, buf);
1314
20.7k
                }
1315
40.3k
                if !skip_val {
1316
6.11k
                    val_encode(2, val, buf);
1317
34.2k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<alloc::string::String, i32, alloc::vec::Vec<u8>, prost::encoding::string::encode<alloc::vec::Vec<u8>>, prost::encoding::string::encoded_len, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len>
Line
Count
Source
1285
463k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
463k
            key_encode: KE,
1287
463k
            key_encoded_len: KL,
1288
463k
            val_encode: VE,
1289
463k
            val_encoded_len: VL,
1290
463k
            val_default: &V,
1291
463k
            tag: u32,
1292
463k
            values: &$map_ty<K, V>,
1293
463k
            buf: &mut B,
1294
463k
        ) where
1295
463k
            K: Default + Eq + Hash + Ord,
1296
463k
            V: PartialEq,
1297
463k
            B: BufMut,
1298
463k
            KE: Fn(u32, &K, &mut B),
1299
463k
            KL: Fn(u32, &K) -> usize,
1300
463k
            VE: Fn(u32, &V, &mut B),
1301
463k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
463k
            for (key, val) in values.iter() {
1304
29.7k
                let skip_key = key == &K::default();
1305
29.7k
                let skip_val = val == val_default;
1306
1307
29.7k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
29.7k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
29.7k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
29.7k
                encode_varint(len as u64, buf);
1312
29.7k
                if !skip_key {
1313
25.3k
                    key_encode(1, key, buf);
1314
25.3k
                }
1315
29.7k
                if !skip_val {
1316
1.01k
                    val_encode(2, val, buf);
1317
28.6k
                }
1318
            }
1319
463k
        }
prost::encoding::btree_map::encode_with_default::<bool, bool, alloc::vec::Vec<u8>, prost::encoding::bool::encode<alloc::vec::Vec<u8>>, prost::encoding::bool::encoded_len, prost::encoding::bool::encode<alloc::vec::Vec<u8>>, prost::encoding::bool::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
5.44k
                let skip_key = key == &K::default();
1305
5.44k
                let skip_val = val == val_default;
1306
1307
5.44k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
5.44k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
5.44k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
5.44k
                encode_varint(len as u64, buf);
1312
5.44k
                if !skip_key {
1313
2.00k
                    key_encode(1, key, buf);
1314
3.43k
                }
1315
5.44k
                if !skip_val {
1316
752
                    val_encode(2, val, buf);
1317
4.68k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<i32, f64, alloc::vec::Vec<u8>, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len, prost::encoding::double::encode<alloc::vec::Vec<u8>>, prost::encoding::double::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
35.6k
                let skip_key = key == &K::default();
1305
35.6k
                let skip_val = val == val_default;
1306
1307
35.6k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
35.6k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
35.6k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
35.6k
                encode_varint(len as u64, buf);
1312
35.6k
                if !skip_key {
1313
24.0k
                    key_encode(1, key, buf);
1314
24.0k
                }
1315
35.6k
                if !skip_val {
1316
794
                    val_encode(2, val, buf);
1317
34.8k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<i32, f32, alloc::vec::Vec<u8>, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len, prost::encoding::float::encode<alloc::vec::Vec<u8>>, prost::encoding::float::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
29.1k
                let skip_key = key == &K::default();
1305
29.1k
                let skip_val = val == val_default;
1306
1307
29.1k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
29.1k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
29.1k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
29.1k
                encode_varint(len as u64, buf);
1312
29.1k
                if !skip_key {
1313
22.8k
                    key_encode(1, key, buf);
1314
22.8k
                }
1315
29.1k
                if !skip_val {
1316
486
                    val_encode(2, val, buf);
1317
28.6k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<i32, i32, alloc::vec::Vec<u8>, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len, prost::encoding::int32::encode<alloc::vec::Vec<u8>>, prost::encoding::int32::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
6.50k
                let skip_key = key == &K::default();
1305
6.50k
                let skip_val = val == val_default;
1306
1307
6.50k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
6.50k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
6.50k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
6.50k
                encode_varint(len as u64, buf);
1312
6.50k
                if !skip_key {
1313
4.38k
                    key_encode(1, key, buf);
1314
4.38k
                }
1315
6.50k
                if !skip_val {
1316
690
                    val_encode(2, val, buf);
1317
5.81k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<i32, i32, alloc::vec::Vec<u8>, prost::encoding::sint32::encode<alloc::vec::Vec<u8>>, prost::encoding::sint32::encoded_len, prost::encoding::sint32::encode<alloc::vec::Vec<u8>>, prost::encoding::sint32::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
24.5k
                let skip_key = key == &K::default();
1305
24.5k
                let skip_val = val == val_default;
1306
1307
24.5k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
24.5k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
24.5k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
24.5k
                encode_varint(len as u64, buf);
1312
24.5k
                if !skip_key {
1313
21.0k
                    key_encode(1, key, buf);
1314
21.0k
                }
1315
24.5k
                if !skip_val {
1316
748
                    val_encode(2, val, buf);
1317
23.7k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<i32, i32, alloc::vec::Vec<u8>, prost::encoding::sfixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed32::encoded_len, prost::encoding::sfixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed32::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
18.0k
                let skip_key = key == &K::default();
1305
18.0k
                let skip_val = val == val_default;
1306
1307
18.0k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
18.0k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
18.0k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
18.0k
                encode_varint(len as u64, buf);
1312
18.0k
                if !skip_key {
1313
15.2k
                    key_encode(1, key, buf);
1314
15.2k
                }
1315
18.0k
                if !skip_val {
1316
916
                    val_encode(2, val, buf);
1317
17.0k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<u32, u32, alloc::vec::Vec<u8>, prost::encoding::uint32::encode<alloc::vec::Vec<u8>>, prost::encoding::uint32::encoded_len, prost::encoding::uint32::encode<alloc::vec::Vec<u8>>, prost::encoding::uint32::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
9.07k
                let skip_key = key == &K::default();
1305
9.07k
                let skip_val = val == val_default;
1306
1307
9.07k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
9.07k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
9.07k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
9.07k
                encode_varint(len as u64, buf);
1312
9.07k
                if !skip_key {
1313
6.81k
                    key_encode(1, key, buf);
1314
6.81k
                }
1315
9.07k
                if !skip_val {
1316
1.49k
                    val_encode(2, val, buf);
1317
7.57k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<u32, u32, alloc::vec::Vec<u8>, prost::encoding::fixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed32::encoded_len, prost::encoding::fixed32::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed32::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
29.2k
                let skip_key = key == &K::default();
1305
29.2k
                let skip_val = val == val_default;
1306
1307
29.2k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
29.2k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
29.2k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
29.2k
                encode_varint(len as u64, buf);
1312
29.2k
                if !skip_key {
1313
27.6k
                    key_encode(1, key, buf);
1314
27.6k
                }
1315
29.2k
                if !skip_val {
1316
230
                    val_encode(2, val, buf);
1317
28.9k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<i64, i64, alloc::vec::Vec<u8>, prost::encoding::int64::encode<alloc::vec::Vec<u8>>, prost::encoding::int64::encoded_len, prost::encoding::int64::encode<alloc::vec::Vec<u8>>, prost::encoding::int64::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
25.1k
                let skip_key = key == &K::default();
1305
25.1k
                let skip_val = val == val_default;
1306
1307
25.1k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
25.1k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
25.1k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
25.1k
                encode_varint(len as u64, buf);
1312
25.1k
                if !skip_key {
1313
21.1k
                    key_encode(1, key, buf);
1314
21.1k
                }
1315
25.1k
                if !skip_val {
1316
862
                    val_encode(2, val, buf);
1317
24.2k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<i64, i64, alloc::vec::Vec<u8>, prost::encoding::sint64::encode<alloc::vec::Vec<u8>>, prost::encoding::sint64::encoded_len, prost::encoding::sint64::encode<alloc::vec::Vec<u8>>, prost::encoding::sint64::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
4.74k
                let skip_key = key == &K::default();
1305
4.74k
                let skip_val = val == val_default;
1306
1307
4.74k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
4.74k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
4.74k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
4.74k
                encode_varint(len as u64, buf);
1312
4.74k
                if !skip_key {
1313
1.98k
                    key_encode(1, key, buf);
1314
2.76k
                }
1315
4.74k
                if !skip_val {
1316
734
                    val_encode(2, val, buf);
1317
4.01k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<i64, i64, alloc::vec::Vec<u8>, prost::encoding::sfixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed64::encoded_len, prost::encoding::sfixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::sfixed64::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
23.1k
                let skip_key = key == &K::default();
1305
23.1k
                let skip_val = val == val_default;
1306
1307
23.1k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
23.1k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
23.1k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
23.1k
                encode_varint(len as u64, buf);
1312
23.1k
                if !skip_key {
1313
19.4k
                    key_encode(1, key, buf);
1314
19.4k
                }
1315
23.1k
                if !skip_val {
1316
1.59k
                    val_encode(2, val, buf);
1317
21.5k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<u64, u64, alloc::vec::Vec<u8>, prost::encoding::uint64::encode<alloc::vec::Vec<u8>>, prost::encoding::uint64::encoded_len, prost::encoding::uint64::encode<alloc::vec::Vec<u8>>, prost::encoding::uint64::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
12.0k
                let skip_key = key == &K::default();
1305
12.0k
                let skip_val = val == val_default;
1306
1307
12.0k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
12.0k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
12.0k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
12.0k
                encode_varint(len as u64, buf);
1312
12.0k
                if !skip_key {
1313
9.27k
                    key_encode(1, key, buf);
1314
9.27k
                }
1315
12.0k
                if !skip_val {
1316
728
                    val_encode(2, val, buf);
1317
11.3k
                }
1318
            }
1319
231k
        }
prost::encoding::btree_map::encode_with_default::<u64, u64, alloc::vec::Vec<u8>, prost::encoding::fixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed64::encoded_len, prost::encoding::fixed64::encode<alloc::vec::Vec<u8>>, prost::encoding::fixed64::encoded_len>
Line
Count
Source
1285
231k
        pub fn encode_with_default<K, V, B, KE, KL, VE, VL>(
1286
231k
            key_encode: KE,
1287
231k
            key_encoded_len: KL,
1288
231k
            val_encode: VE,
1289
231k
            val_encoded_len: VL,
1290
231k
            val_default: &V,
1291
231k
            tag: u32,
1292
231k
            values: &$map_ty<K, V>,
1293
231k
            buf: &mut B,
1294
231k
        ) where
1295
231k
            K: Default + Eq + Hash + Ord,
1296
231k
            V: PartialEq,
1297
231k
            B: BufMut,
1298
231k
            KE: Fn(u32, &K, &mut B),
1299
231k
            KL: Fn(u32, &K) -> usize,
1300
231k
            VE: Fn(u32, &V, &mut B),
1301
231k
            VL: Fn(u32, &V) -> usize,
1302
        {
1303
231k
            for (key, val) in values.iter() {
1304
8.61k
                let skip_key = key == &K::default();
1305
8.61k
                let skip_val = val == val_default;
1306
1307
8.61k
                let len = (if skip_key { 0 } else { key_encoded_len(1, key) })
1308
8.61k
                    + (if skip_val { 0 } else { val_encoded_len(2, val) });
1309
1310
8.61k
                encode_key(tag, WireType::LengthDelimited, buf);
1311
8.61k
                encode_varint(len as u64, buf);
1312
8.61k
                if !skip_key {
1313
6.34k
                    key_encode(1, key, buf);
1314
6.34k
                }
1315
8.61k
                if !skip_val {
1316
788
                    val_encode(2, val, buf);
1317
7.82k
                }
1318
            }
1319
231k
        }
1320
1321
        /// Generic protobuf map merge function with an overriden value default.
1322
        ///
1323
        /// This is necessary because enumeration values can have a default value other
1324
        /// than 0 in proto2.
1325
4.98M
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
4.98M
            key_merge: KM,
1327
4.98M
            val_merge: VM,
1328
4.98M
            val_default: V,
1329
4.98M
            values: &mut $map_ty<K, V>,
1330
4.98M
            buf: &mut B,
1331
4.98M
            ctx: DecodeContext,
1332
4.98M
        ) -> Result<(), DecodeError>
1333
4.98M
        where
1334
4.98M
            K: Default + Eq + Hash + Ord,
1335
4.98M
            B: Buf,
1336
4.98M
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
4.98M
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
4.98M
            let mut key = Default::default();
1340
4.98M
            let mut val = val_default;
1341
4.98M
            ctx.limit_reached()?;
1342
4.98M
            merge_loop(
1343
4.98M
                &mut (&mut key, &mut val),
1344
4.98M
                buf,
1345
4.98M
                ctx.enter_recursion(),
1346
4.66M
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
4.66M
                    let (tag, wire_type) = decode_key(buf)?;
1348
4.66M
                    match tag {
1349
4.22M
                        1 => key_merge(wire_type, key, buf, ctx),
1350
94.6k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
349k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
4.66M
                },
prost::encoding::btree_map::merge_with_default::<alloc::string::String, alloc::string::String, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::string::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
135k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
135k
                    let (tag, wire_type) = decode_key(buf)?;
1348
135k
                    match tag {
1349
130k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
2.09k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
2.93k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
135k
                },
prost::encoding::btree_map::merge_with_default::<alloc::string::String, alloc::vec::Vec<u8>, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::bytes::merge<alloc::vec::Vec<u8>, &mut &[u8]>>::{closure#0}
Line
Count
Source
1346
218k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
218k
                    let (tag, wire_type) = decode_key(buf)?;
1348
218k
                    match tag {
1349
179k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
3.22k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
35.5k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
218k
                },
prost::encoding::btree_map::merge_with_default::<alloc::string::String, prost_types::Value, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<prost_types::Value, &mut &[u8]>>::{closure#0}
Line
Count
Source
1346
188k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
188k
                    let (tag, wire_type) = decode_key(buf)?;
1348
188k
                    match tag {
1349
174k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
8.42k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
5.83k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
188k
                },
prost::encoding::btree_map::merge_with_default::<alloc::string::String, protobuf::test_messages::proto3::ForeignMessage, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto3::ForeignMessage, &mut &[u8]>>::{closure#0}
Line
Count
Source
1346
201k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
201k
                    let (tag, wire_type) = decode_key(buf)?;
1348
201k
                    match tag {
1349
178k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
910
                        2 => val_merge(wire_type, val, buf, ctx),
1351
22.1k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
201k
                },
prost::encoding::btree_map::merge_with_default::<alloc::string::String, protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, &mut &[u8]>>::{closure#0}
Line
Count
Source
1346
281k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
281k
                    let (tag, wire_type) = decode_key(buf)?;
1348
281k
                    match tag {
1349
255k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
3.72k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
22.3k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
281k
                },
prost::encoding::btree_map::merge_with_default::<alloc::string::String, i32, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
196k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
196k
                    let (tag, wire_type) = decode_key(buf)?;
1348
196k
                    match tag {
1349
173k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
3.85k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
18.8k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
196k
                },
prost::encoding::btree_map::merge_with_default::<bool, bool, &mut &[u8], prost::encoding::bool::merge<&mut &[u8]>, prost::encoding::bool::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
9.44k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
9.44k
                    let (tag, wire_type) = decode_key(buf)?;
1348
9.43k
                    match tag {
1349
7.15k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
283
                        2 => val_merge(wire_type, val, buf, ctx),
1351
1.99k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
9.44k
                },
prost::encoding::btree_map::merge_with_default::<i32, f64, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::double::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
208k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
208k
                    let (tag, wire_type) = decode_key(buf)?;
1348
208k
                    match tag {
1349
164k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
465
                        2 => val_merge(wire_type, val, buf, ctx),
1351
43.4k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
208k
                },
prost::encoding::btree_map::merge_with_default::<i32, f32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::float::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
91.8k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
91.8k
                    let (tag, wire_type) = decode_key(buf)?;
1348
91.7k
                    match tag {
1349
69.3k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
15.5k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
6.89k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
91.8k
                },
prost::encoding::btree_map::merge_with_default::<i32, i32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
7.36k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
7.36k
                    let (tag, wire_type) = decode_key(buf)?;
1348
7.36k
                    match tag {
1349
5.35k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
1.53k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
469
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
7.36k
                },
prost::encoding::btree_map::merge_with_default::<i32, i32, &mut &[u8], prost::encoding::sint32::merge<&mut &[u8]>, prost::encoding::sint32::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
10.9k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
10.9k
                    let (tag, wire_type) = decode_key(buf)?;
1348
10.9k
                    match tag {
1349
9.43k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
945
                        2 => val_merge(wire_type, val, buf, ctx),
1351
580
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
10.9k
                },
prost::encoding::btree_map::merge_with_default::<i32, i32, &mut &[u8], prost::encoding::sfixed32::merge<&mut &[u8]>, prost::encoding::sfixed32::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
120k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
120k
                    let (tag, wire_type) = decode_key(buf)?;
1348
120k
                    match tag {
1349
110k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
5.72k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
3.78k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
120k
                },
prost::encoding::btree_map::merge_with_default::<u32, u32, &mut &[u8], prost::encoding::uint32::merge<&mut &[u8]>, prost::encoding::uint32::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
37.7k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
37.7k
                    let (tag, wire_type) = decode_key(buf)?;
1348
37.7k
                    match tag {
1349
33.3k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
2.17k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
2.20k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
37.7k
                },
prost::encoding::btree_map::merge_with_default::<u32, u32, &mut &[u8], prost::encoding::fixed32::merge<&mut &[u8]>, prost::encoding::fixed32::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
194k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
194k
                    let (tag, wire_type) = decode_key(buf)?;
1348
194k
                    match tag {
1349
190k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
504
                        2 => val_merge(wire_type, val, buf, ctx),
1351
2.70k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
194k
                },
prost::encoding::btree_map::merge_with_default::<i64, i64, &mut &[u8], prost::encoding::int64::merge<&mut &[u8]>, prost::encoding::int64::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
6.40k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
6.40k
                    let (tag, wire_type) = decode_key(buf)?;
1348
6.39k
                    match tag {
1349
5.06k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
891
                        2 => val_merge(wire_type, val, buf, ctx),
1351
448
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
6.40k
                },
prost::encoding::btree_map::merge_with_default::<i64, i64, &mut &[u8], prost::encoding::sint64::merge<&mut &[u8]>, prost::encoding::sint64::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
30.8k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
30.8k
                    let (tag, wire_type) = decode_key(buf)?;
1348
30.8k
                    match tag {
1349
27.1k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
864
                        2 => val_merge(wire_type, val, buf, ctx),
1351
2.73k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
30.8k
                },
prost::encoding::btree_map::merge_with_default::<i64, i64, &mut &[u8], prost::encoding::sfixed64::merge<&mut &[u8]>, prost::encoding::sfixed64::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
222k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
222k
                    let (tag, wire_type) = decode_key(buf)?;
1348
222k
                    match tag {
1349
215k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
727
                        2 => val_merge(wire_type, val, buf, ctx),
1351
5.61k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
222k
                },
prost::encoding::btree_map::merge_with_default::<u64, u64, &mut &[u8], prost::encoding::uint64::merge<&mut &[u8]>, prost::encoding::uint64::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
27.0k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
27.0k
                    let (tag, wire_type) = decode_key(buf)?;
1348
27.0k
                    match tag {
1349
24.8k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
943
                        2 => val_merge(wire_type, val, buf, ctx),
1351
1.32k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
27.0k
                },
prost::encoding::btree_map::merge_with_default::<u64, u64, &mut &[u8], prost::encoding::fixed64::merge<&mut &[u8]>, prost::encoding::fixed64::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
144k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
144k
                    let (tag, wire_type) = decode_key(buf)?;
1348
144k
                    match tag {
1349
136k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
1.05k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
7.57k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
144k
                },
Unexecuted instantiation: prost::encoding::hash_map::merge_with_default::<_, _, _, _, _>::{closure#0}
Unexecuted instantiation: prost::encoding::btree_map::merge_with_default::<_, _, _, _, _>::{closure#0}
prost::encoding::btree_map::merge_with_default::<alloc::string::String, alloc::string::String, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::string::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
142k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
142k
                    let (tag, wire_type) = decode_key(buf)?;
1348
142k
                    match tag {
1349
132k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
6.75k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
3.49k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
142k
                },
prost::encoding::btree_map::merge_with_default::<alloc::string::String, alloc::vec::Vec<u8>, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::bytes::merge<alloc::vec::Vec<u8>, &mut &[u8]>>::{closure#0}
Line
Count
Source
1346
217k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
217k
                    let (tag, wire_type) = decode_key(buf)?;
1348
217k
                    match tag {
1349
210k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
891
                        2 => val_merge(wire_type, val, buf, ctx),
1351
5.52k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
217k
                },
prost::encoding::btree_map::merge_with_default::<alloc::string::String, protobuf::test_messages::proto2::ForeignMessageProto2, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto2::ForeignMessageProto2, &mut &[u8]>>::{closure#0}
Line
Count
Source
1346
218k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
218k
                    let (tag, wire_type) = decode_key(buf)?;
1348
218k
                    match tag {
1349
159k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
1.51k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
56.9k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
218k
                },
prost::encoding::btree_map::merge_with_default::<alloc::string::String, protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, &mut &[u8]>>::{closure#0}
Line
Count
Source
1346
239k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
239k
                    let (tag, wire_type) = decode_key(buf)?;
1348
239k
                    match tag {
1349
214k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
9.22k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
16.3k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
239k
                },
prost::encoding::btree_map::merge_with_default::<alloc::string::String, i32, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
273k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
273k
                    let (tag, wire_type) = decode_key(buf)?;
1348
273k
                    match tag {
1349
245k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
6.66k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
21.3k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
273k
                },
prost::encoding::btree_map::merge_with_default::<bool, bool, &mut &[u8], prost::encoding::bool::merge<&mut &[u8]>, prost::encoding::bool::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
7.78k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
7.78k
                    let (tag, wire_type) = decode_key(buf)?;
1348
7.78k
                    match tag {
1349
4.83k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
1.32k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
1.62k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
7.78k
                },
prost::encoding::btree_map::merge_with_default::<i32, f64, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::double::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
181k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
181k
                    let (tag, wire_type) = decode_key(buf)?;
1348
181k
                    match tag {
1349
153k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
991
                        2 => val_merge(wire_type, val, buf, ctx),
1351
26.5k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
181k
                },
prost::encoding::btree_map::merge_with_default::<i32, f32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::float::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
153k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
153k
                    let (tag, wire_type) = decode_key(buf)?;
1348
153k
                    match tag {
1349
148k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
783
                        2 => val_merge(wire_type, val, buf, ctx),
1351
3.76k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
153k
                },
prost::encoding::btree_map::merge_with_default::<i32, i32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
7.00k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
7.00k
                    let (tag, wire_type) = decode_key(buf)?;
1348
7.00k
                    match tag {
1349
5.26k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
1.31k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
424
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
7.00k
                },
prost::encoding::btree_map::merge_with_default::<i32, i32, &mut &[u8], prost::encoding::sint32::merge<&mut &[u8]>, prost::encoding::sint32::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
41.3k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
41.3k
                    let (tag, wire_type) = decode_key(buf)?;
1348
41.3k
                    match tag {
1349
34.2k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
976
                        2 => val_merge(wire_type, val, buf, ctx),
1351
6.14k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
41.3k
                },
prost::encoding::btree_map::merge_with_default::<i32, i32, &mut &[u8], prost::encoding::sfixed32::merge<&mut &[u8]>, prost::encoding::sfixed32::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
149k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
149k
                    let (tag, wire_type) = decode_key(buf)?;
1348
149k
                    match tag {
1349
147k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
1.17k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
847
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
149k
                },
prost::encoding::btree_map::merge_with_default::<u32, u32, &mut &[u8], prost::encoding::uint32::merge<&mut &[u8]>, prost::encoding::uint32::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
13.9k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
13.9k
                    let (tag, wire_type) = decode_key(buf)?;
1348
13.9k
                    match tag {
1349
9.99k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
2.32k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
1.60k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
13.9k
                },
prost::encoding::btree_map::merge_with_default::<u32, u32, &mut &[u8], prost::encoding::fixed32::merge<&mut &[u8]>, prost::encoding::fixed32::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
247k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
247k
                    let (tag, wire_type) = decode_key(buf)?;
1348
247k
                    match tag {
1349
236k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
426
                        2 => val_merge(wire_type, val, buf, ctx),
1351
10.0k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
247k
                },
prost::encoding::btree_map::merge_with_default::<i64, i64, &mut &[u8], prost::encoding::int64::merge<&mut &[u8]>, prost::encoding::int64::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
30.7k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
30.7k
                    let (tag, wire_type) = decode_key(buf)?;
1348
30.7k
                    match tag {
1349
28.9k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
1.20k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
640
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
30.7k
                },
prost::encoding::btree_map::merge_with_default::<i64, i64, &mut &[u8], prost::encoding::sint64::merge<&mut &[u8]>, prost::encoding::sint64::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
4.40k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
4.40k
                    let (tag, wire_type) = decode_key(buf)?;
1348
4.39k
                    match tag {
1349
2.74k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
1.03k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
613
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
4.40k
                },
prost::encoding::btree_map::merge_with_default::<i64, i64, &mut &[u8], prost::encoding::sfixed64::merge<&mut &[u8]>, prost::encoding::sfixed64::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
174k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
174k
                    let (tag, wire_type) = decode_key(buf)?;
1348
174k
                    match tag {
1349
170k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
1.64k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
2.27k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
174k
                },
prost::encoding::btree_map::merge_with_default::<u64, u64, &mut &[u8], prost::encoding::uint64::merge<&mut &[u8]>, prost::encoding::uint64::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
71.3k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
71.3k
                    let (tag, wire_type) = decode_key(buf)?;
1348
71.3k
                    match tag {
1349
68.5k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
1.11k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
1.72k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
71.3k
                },
prost::encoding::btree_map::merge_with_default::<u64, u64, &mut &[u8], prost::encoding::fixed64::merge<&mut &[u8]>, prost::encoding::fixed64::merge<&mut &[u8]>>::{closure#0}
Line
Count
Source
1346
159k
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
159k
                    let (tag, wire_type) = decode_key(buf)?;
1348
159k
                    match tag {
1349
156k
                        1 => key_merge(wire_type, key, buf, ctx),
1350
1.30k
                        2 => val_merge(wire_type, val, buf, ctx),
1351
1.81k
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
159k
                },
1354
8.75k
            )?;
1355
4.97M
            values.insert(key, val);
1356
1357
4.97M
            Ok(())
1358
4.98M
        }
prost::encoding::btree_map::merge_with_default::<alloc::string::String, alloc::string::String, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::string::merge<&mut &[u8]>>
Line
Count
Source
1325
186k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
186k
            key_merge: KM,
1327
186k
            val_merge: VM,
1328
186k
            val_default: V,
1329
186k
            values: &mut $map_ty<K, V>,
1330
186k
            buf: &mut B,
1331
186k
            ctx: DecodeContext,
1332
186k
        ) -> Result<(), DecodeError>
1333
186k
        where
1334
186k
            K: Default + Eq + Hash + Ord,
1335
186k
            B: Buf,
1336
186k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
186k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
186k
            let mut key = Default::default();
1340
186k
            let mut val = val_default;
1341
186k
            ctx.limit_reached()?;
1342
186k
            merge_loop(
1343
186k
                &mut (&mut key, &mut val),
1344
186k
                buf,
1345
186k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
148
            )?;
1355
186k
            values.insert(key, val);
1356
1357
186k
            Ok(())
1358
186k
        }
prost::encoding::btree_map::merge_with_default::<alloc::string::String, alloc::vec::Vec<u8>, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::bytes::merge<alloc::vec::Vec<u8>, &mut &[u8]>>
Line
Count
Source
1325
216k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
216k
            key_merge: KM,
1327
216k
            val_merge: VM,
1328
216k
            val_default: V,
1329
216k
            values: &mut $map_ty<K, V>,
1330
216k
            buf: &mut B,
1331
216k
            ctx: DecodeContext,
1332
216k
        ) -> Result<(), DecodeError>
1333
216k
        where
1334
216k
            K: Default + Eq + Hash + Ord,
1335
216k
            B: Buf,
1336
216k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
216k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
216k
            let mut key = Default::default();
1340
216k
            let mut val = val_default;
1341
216k
            ctx.limit_reached()?;
1342
216k
            merge_loop(
1343
216k
                &mut (&mut key, &mut val),
1344
216k
                buf,
1345
216k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
194
            )?;
1355
216k
            values.insert(key, val);
1356
1357
216k
            Ok(())
1358
216k
        }
prost::encoding::btree_map::merge_with_default::<alloc::string::String, prost_types::Value, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<prost_types::Value, &mut &[u8]>>
Line
Count
Source
1325
193k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
193k
            key_merge: KM,
1327
193k
            val_merge: VM,
1328
193k
            val_default: V,
1329
193k
            values: &mut $map_ty<K, V>,
1330
193k
            buf: &mut B,
1331
193k
            ctx: DecodeContext,
1332
193k
        ) -> Result<(), DecodeError>
1333
193k
        where
1334
193k
            K: Default + Eq + Hash + Ord,
1335
193k
            B: Buf,
1336
193k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
193k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
193k
            let mut key = Default::default();
1340
193k
            let mut val = val_default;
1341
193k
            ctx.limit_reached()?;
1342
193k
            merge_loop(
1343
193k
                &mut (&mut key, &mut val),
1344
193k
                buf,
1345
193k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
954
            )?;
1355
192k
            values.insert(key, val);
1356
1357
192k
            Ok(())
1358
193k
        }
prost::encoding::btree_map::merge_with_default::<alloc::string::String, protobuf::test_messages::proto3::ForeignMessage, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto3::ForeignMessage, &mut &[u8]>>
Line
Count
Source
1325
203k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
203k
            key_merge: KM,
1327
203k
            val_merge: VM,
1328
203k
            val_default: V,
1329
203k
            values: &mut $map_ty<K, V>,
1330
203k
            buf: &mut B,
1331
203k
            ctx: DecodeContext,
1332
203k
        ) -> Result<(), DecodeError>
1333
203k
        where
1334
203k
            K: Default + Eq + Hash + Ord,
1335
203k
            B: Buf,
1336
203k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
203k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
203k
            let mut key = Default::default();
1340
203k
            let mut val = val_default;
1341
203k
            ctx.limit_reached()?;
1342
203k
            merge_loop(
1343
203k
                &mut (&mut key, &mut val),
1344
203k
                buf,
1345
203k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
167
            )?;
1355
203k
            values.insert(key, val);
1356
1357
203k
            Ok(())
1358
203k
        }
prost::encoding::btree_map::merge_with_default::<alloc::string::String, protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, &mut &[u8]>>
Line
Count
Source
1325
278k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
278k
            key_merge: KM,
1327
278k
            val_merge: VM,
1328
278k
            val_default: V,
1329
278k
            values: &mut $map_ty<K, V>,
1330
278k
            buf: &mut B,
1331
278k
            ctx: DecodeContext,
1332
278k
        ) -> Result<(), DecodeError>
1333
278k
        where
1334
278k
            K: Default + Eq + Hash + Ord,
1335
278k
            B: Buf,
1336
278k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
278k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
278k
            let mut key = Default::default();
1340
278k
            let mut val = val_default;
1341
278k
            ctx.limit_reached()?;
1342
278k
            merge_loop(
1343
278k
                &mut (&mut key, &mut val),
1344
278k
                buf,
1345
278k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
1.07k
            )?;
1355
277k
            values.insert(key, val);
1356
1357
277k
            Ok(())
1358
278k
        }
prost::encoding::btree_map::merge_with_default::<alloc::string::String, i32, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>
Line
Count
Source
1325
203k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
203k
            key_merge: KM,
1327
203k
            val_merge: VM,
1328
203k
            val_default: V,
1329
203k
            values: &mut $map_ty<K, V>,
1330
203k
            buf: &mut B,
1331
203k
            ctx: DecodeContext,
1332
203k
        ) -> Result<(), DecodeError>
1333
203k
        where
1334
203k
            K: Default + Eq + Hash + Ord,
1335
203k
            B: Buf,
1336
203k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
203k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
203k
            let mut key = Default::default();
1340
203k
            let mut val = val_default;
1341
203k
            ctx.limit_reached()?;
1342
203k
            merge_loop(
1343
203k
                &mut (&mut key, &mut val),
1344
203k
                buf,
1345
203k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
160
            )?;
1355
203k
            values.insert(key, val);
1356
1357
203k
            Ok(())
1358
203k
        }
prost::encoding::btree_map::merge_with_default::<bool, bool, &mut &[u8], prost::encoding::bool::merge<&mut &[u8]>, prost::encoding::bool::merge<&mut &[u8]>>
Line
Count
Source
1325
21.2k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
21.2k
            key_merge: KM,
1327
21.2k
            val_merge: VM,
1328
21.2k
            val_default: V,
1329
21.2k
            values: &mut $map_ty<K, V>,
1330
21.2k
            buf: &mut B,
1331
21.2k
            ctx: DecodeContext,
1332
21.2k
        ) -> Result<(), DecodeError>
1333
21.2k
        where
1334
21.2k
            K: Default + Eq + Hash + Ord,
1335
21.2k
            B: Buf,
1336
21.2k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
21.2k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
21.2k
            let mut key = Default::default();
1340
21.2k
            let mut val = val_default;
1341
21.2k
            ctx.limit_reached()?;
1342
21.2k
            merge_loop(
1343
21.2k
                &mut (&mut key, &mut val),
1344
21.2k
                buf,
1345
21.2k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
177
            )?;
1355
21.0k
            values.insert(key, val);
1356
1357
21.0k
            Ok(())
1358
21.2k
        }
prost::encoding::btree_map::merge_with_default::<i32, f64, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::double::merge<&mut &[u8]>>
Line
Count
Source
1325
182k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
182k
            key_merge: KM,
1327
182k
            val_merge: VM,
1328
182k
            val_default: V,
1329
182k
            values: &mut $map_ty<K, V>,
1330
182k
            buf: &mut B,
1331
182k
            ctx: DecodeContext,
1332
182k
        ) -> Result<(), DecodeError>
1333
182k
        where
1334
182k
            K: Default + Eq + Hash + Ord,
1335
182k
            B: Buf,
1336
182k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
182k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
182k
            let mut key = Default::default();
1340
182k
            let mut val = val_default;
1341
182k
            ctx.limit_reached()?;
1342
182k
            merge_loop(
1343
182k
                &mut (&mut key, &mut val),
1344
182k
                buf,
1345
182k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
141
            )?;
1355
182k
            values.insert(key, val);
1356
1357
182k
            Ok(())
1358
182k
        }
prost::encoding::btree_map::merge_with_default::<i32, f32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::float::merge<&mut &[u8]>>
Line
Count
Source
1325
97.4k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
97.4k
            key_merge: KM,
1327
97.4k
            val_merge: VM,
1328
97.4k
            val_default: V,
1329
97.4k
            values: &mut $map_ty<K, V>,
1330
97.4k
            buf: &mut B,
1331
97.4k
            ctx: DecodeContext,
1332
97.4k
        ) -> Result<(), DecodeError>
1333
97.4k
        where
1334
97.4k
            K: Default + Eq + Hash + Ord,
1335
97.4k
            B: Buf,
1336
97.4k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
97.4k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
97.4k
            let mut key = Default::default();
1340
97.4k
            let mut val = val_default;
1341
97.4k
            ctx.limit_reached()?;
1342
97.4k
            merge_loop(
1343
97.4k
                &mut (&mut key, &mut val),
1344
97.4k
                buf,
1345
97.4k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
80
            )?;
1355
97.3k
            values.insert(key, val);
1356
1357
97.3k
            Ok(())
1358
97.4k
        }
prost::encoding::btree_map::merge_with_default::<i32, i32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>
Line
Count
Source
1325
9.13k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
9.13k
            key_merge: KM,
1327
9.13k
            val_merge: VM,
1328
9.13k
            val_default: V,
1329
9.13k
            values: &mut $map_ty<K, V>,
1330
9.13k
            buf: &mut B,
1331
9.13k
            ctx: DecodeContext,
1332
9.13k
        ) -> Result<(), DecodeError>
1333
9.13k
        where
1334
9.13k
            K: Default + Eq + Hash + Ord,
1335
9.13k
            B: Buf,
1336
9.13k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
9.13k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
9.13k
            let mut key = Default::default();
1340
9.13k
            let mut val = val_default;
1341
9.13k
            ctx.limit_reached()?;
1342
9.12k
            merge_loop(
1343
9.12k
                &mut (&mut key, &mut val),
1344
9.12k
                buf,
1345
9.12k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
165
            )?;
1355
8.96k
            values.insert(key, val);
1356
1357
8.96k
            Ok(())
1358
9.13k
        }
prost::encoding::btree_map::merge_with_default::<i32, i32, &mut &[u8], prost::encoding::sint32::merge<&mut &[u8]>, prost::encoding::sint32::merge<&mut &[u8]>>
Line
Count
Source
1325
14.0k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
14.0k
            key_merge: KM,
1327
14.0k
            val_merge: VM,
1328
14.0k
            val_default: V,
1329
14.0k
            values: &mut $map_ty<K, V>,
1330
14.0k
            buf: &mut B,
1331
14.0k
            ctx: DecodeContext,
1332
14.0k
        ) -> Result<(), DecodeError>
1333
14.0k
        where
1334
14.0k
            K: Default + Eq + Hash + Ord,
1335
14.0k
            B: Buf,
1336
14.0k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
14.0k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
14.0k
            let mut key = Default::default();
1340
14.0k
            let mut val = val_default;
1341
14.0k
            ctx.limit_reached()?;
1342
14.0k
            merge_loop(
1343
14.0k
                &mut (&mut key, &mut val),
1344
14.0k
                buf,
1345
14.0k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
169
            )?;
1355
13.9k
            values.insert(key, val);
1356
1357
13.9k
            Ok(())
1358
14.0k
        }
prost::encoding::btree_map::merge_with_default::<i32, i32, &mut &[u8], prost::encoding::sfixed32::merge<&mut &[u8]>, prost::encoding::sfixed32::merge<&mut &[u8]>>
Line
Count
Source
1325
143k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
143k
            key_merge: KM,
1327
143k
            val_merge: VM,
1328
143k
            val_default: V,
1329
143k
            values: &mut $map_ty<K, V>,
1330
143k
            buf: &mut B,
1331
143k
            ctx: DecodeContext,
1332
143k
        ) -> Result<(), DecodeError>
1333
143k
        where
1334
143k
            K: Default + Eq + Hash + Ord,
1335
143k
            B: Buf,
1336
143k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
143k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
143k
            let mut key = Default::default();
1340
143k
            let mut val = val_default;
1341
143k
            ctx.limit_reached()?;
1342
143k
            merge_loop(
1343
143k
                &mut (&mut key, &mut val),
1344
143k
                buf,
1345
143k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
190
            )?;
1355
143k
            values.insert(key, val);
1356
1357
143k
            Ok(())
1358
143k
        }
prost::encoding::btree_map::merge_with_default::<u32, u32, &mut &[u8], prost::encoding::uint32::merge<&mut &[u8]>, prost::encoding::uint32::merge<&mut &[u8]>>
Line
Count
Source
1325
35.4k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
35.4k
            key_merge: KM,
1327
35.4k
            val_merge: VM,
1328
35.4k
            val_default: V,
1329
35.4k
            values: &mut $map_ty<K, V>,
1330
35.4k
            buf: &mut B,
1331
35.4k
            ctx: DecodeContext,
1332
35.4k
        ) -> Result<(), DecodeError>
1333
35.4k
        where
1334
35.4k
            K: Default + Eq + Hash + Ord,
1335
35.4k
            B: Buf,
1336
35.4k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
35.4k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
35.4k
            let mut key = Default::default();
1340
35.4k
            let mut val = val_default;
1341
35.4k
            ctx.limit_reached()?;
1342
35.4k
            merge_loop(
1343
35.4k
                &mut (&mut key, &mut val),
1344
35.4k
                buf,
1345
35.4k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
146
            )?;
1355
35.2k
            values.insert(key, val);
1356
1357
35.2k
            Ok(())
1358
35.4k
        }
prost::encoding::btree_map::merge_with_default::<u32, u32, &mut &[u8], prost::encoding::fixed32::merge<&mut &[u8]>, prost::encoding::fixed32::merge<&mut &[u8]>>
Line
Count
Source
1325
208k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
208k
            key_merge: KM,
1327
208k
            val_merge: VM,
1328
208k
            val_default: V,
1329
208k
            values: &mut $map_ty<K, V>,
1330
208k
            buf: &mut B,
1331
208k
            ctx: DecodeContext,
1332
208k
        ) -> Result<(), DecodeError>
1333
208k
        where
1334
208k
            K: Default + Eq + Hash + Ord,
1335
208k
            B: Buf,
1336
208k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
208k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
208k
            let mut key = Default::default();
1340
208k
            let mut val = val_default;
1341
208k
            ctx.limit_reached()?;
1342
208k
            merge_loop(
1343
208k
                &mut (&mut key, &mut val),
1344
208k
                buf,
1345
208k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
159
            )?;
1355
208k
            values.insert(key, val);
1356
1357
208k
            Ok(())
1358
208k
        }
prost::encoding::btree_map::merge_with_default::<i64, i64, &mut &[u8], prost::encoding::int64::merge<&mut &[u8]>, prost::encoding::int64::merge<&mut &[u8]>>
Line
Count
Source
1325
17.7k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
17.7k
            key_merge: KM,
1327
17.7k
            val_merge: VM,
1328
17.7k
            val_default: V,
1329
17.7k
            values: &mut $map_ty<K, V>,
1330
17.7k
            buf: &mut B,
1331
17.7k
            ctx: DecodeContext,
1332
17.7k
        ) -> Result<(), DecodeError>
1333
17.7k
        where
1334
17.7k
            K: Default + Eq + Hash + Ord,
1335
17.7k
            B: Buf,
1336
17.7k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
17.7k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
17.7k
            let mut key = Default::default();
1340
17.7k
            let mut val = val_default;
1341
17.7k
            ctx.limit_reached()?;
1342
17.7k
            merge_loop(
1343
17.7k
                &mut (&mut key, &mut val),
1344
17.7k
                buf,
1345
17.7k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
162
            )?;
1355
17.5k
            values.insert(key, val);
1356
1357
17.5k
            Ok(())
1358
17.7k
        }
prost::encoding::btree_map::merge_with_default::<i64, i64, &mut &[u8], prost::encoding::sint64::merge<&mut &[u8]>, prost::encoding::sint64::merge<&mut &[u8]>>
Line
Count
Source
1325
61.2k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
61.2k
            key_merge: KM,
1327
61.2k
            val_merge: VM,
1328
61.2k
            val_default: V,
1329
61.2k
            values: &mut $map_ty<K, V>,
1330
61.2k
            buf: &mut B,
1331
61.2k
            ctx: DecodeContext,
1332
61.2k
        ) -> Result<(), DecodeError>
1333
61.2k
        where
1334
61.2k
            K: Default + Eq + Hash + Ord,
1335
61.2k
            B: Buf,
1336
61.2k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
61.2k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
61.2k
            let mut key = Default::default();
1340
61.2k
            let mut val = val_default;
1341
61.2k
            ctx.limit_reached()?;
1342
61.2k
            merge_loop(
1343
61.2k
                &mut (&mut key, &mut val),
1344
61.2k
                buf,
1345
61.2k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
123
            )?;
1355
61.1k
            values.insert(key, val);
1356
1357
61.1k
            Ok(())
1358
61.2k
        }
prost::encoding::btree_map::merge_with_default::<i64, i64, &mut &[u8], prost::encoding::sfixed64::merge<&mut &[u8]>, prost::encoding::sfixed64::merge<&mut &[u8]>>
Line
Count
Source
1325
296k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
296k
            key_merge: KM,
1327
296k
            val_merge: VM,
1328
296k
            val_default: V,
1329
296k
            values: &mut $map_ty<K, V>,
1330
296k
            buf: &mut B,
1331
296k
            ctx: DecodeContext,
1332
296k
        ) -> Result<(), DecodeError>
1333
296k
        where
1334
296k
            K: Default + Eq + Hash + Ord,
1335
296k
            B: Buf,
1336
296k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
296k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
296k
            let mut key = Default::default();
1340
296k
            let mut val = val_default;
1341
296k
            ctx.limit_reached()?;
1342
296k
            merge_loop(
1343
296k
                &mut (&mut key, &mut val),
1344
296k
                buf,
1345
296k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
126
            )?;
1355
295k
            values.insert(key, val);
1356
1357
295k
            Ok(())
1358
296k
        }
prost::encoding::btree_map::merge_with_default::<u64, u64, &mut &[u8], prost::encoding::uint64::merge<&mut &[u8]>, prost::encoding::uint64::merge<&mut &[u8]>>
Line
Count
Source
1325
50.6k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
50.6k
            key_merge: KM,
1327
50.6k
            val_merge: VM,
1328
50.6k
            val_default: V,
1329
50.6k
            values: &mut $map_ty<K, V>,
1330
50.6k
            buf: &mut B,
1331
50.6k
            ctx: DecodeContext,
1332
50.6k
        ) -> Result<(), DecodeError>
1333
50.6k
        where
1334
50.6k
            K: Default + Eq + Hash + Ord,
1335
50.6k
            B: Buf,
1336
50.6k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
50.6k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
50.6k
            let mut key = Default::default();
1340
50.6k
            let mut val = val_default;
1341
50.6k
            ctx.limit_reached()?;
1342
50.6k
            merge_loop(
1343
50.6k
                &mut (&mut key, &mut val),
1344
50.6k
                buf,
1345
50.6k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
143
            )?;
1355
50.4k
            values.insert(key, val);
1356
1357
50.4k
            Ok(())
1358
50.6k
        }
prost::encoding::btree_map::merge_with_default::<u64, u64, &mut &[u8], prost::encoding::fixed64::merge<&mut &[u8]>, prost::encoding::fixed64::merge<&mut &[u8]>>
Line
Count
Source
1325
159k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
159k
            key_merge: KM,
1327
159k
            val_merge: VM,
1328
159k
            val_default: V,
1329
159k
            values: &mut $map_ty<K, V>,
1330
159k
            buf: &mut B,
1331
159k
            ctx: DecodeContext,
1332
159k
        ) -> Result<(), DecodeError>
1333
159k
        where
1334
159k
            K: Default + Eq + Hash + Ord,
1335
159k
            B: Buf,
1336
159k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
159k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
159k
            let mut key = Default::default();
1340
159k
            let mut val = val_default;
1341
159k
            ctx.limit_reached()?;
1342
159k
            merge_loop(
1343
159k
                &mut (&mut key, &mut val),
1344
159k
                buf,
1345
159k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
99
            )?;
1355
158k
            values.insert(key, val);
1356
1357
158k
            Ok(())
1358
159k
        }
Unexecuted instantiation: prost::encoding::hash_map::merge_with_default::<_, _, _, _, _>
Unexecuted instantiation: prost::encoding::btree_map::merge_with_default::<_, _, _, _, _>
prost::encoding::btree_map::merge_with_default::<alloc::string::String, alloc::string::String, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::string::merge<&mut &[u8]>>
Line
Count
Source
1325
151k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
151k
            key_merge: KM,
1327
151k
            val_merge: VM,
1328
151k
            val_default: V,
1329
151k
            values: &mut $map_ty<K, V>,
1330
151k
            buf: &mut B,
1331
151k
            ctx: DecodeContext,
1332
151k
        ) -> Result<(), DecodeError>
1333
151k
        where
1334
151k
            K: Default + Eq + Hash + Ord,
1335
151k
            B: Buf,
1336
151k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
151k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
151k
            let mut key = Default::default();
1340
151k
            let mut val = val_default;
1341
151k
            ctx.limit_reached()?;
1342
151k
            merge_loop(
1343
151k
                &mut (&mut key, &mut val),
1344
151k
                buf,
1345
151k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
207
            )?;
1355
151k
            values.insert(key, val);
1356
1357
151k
            Ok(())
1358
151k
        }
prost::encoding::btree_map::merge_with_default::<alloc::string::String, alloc::vec::Vec<u8>, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::bytes::merge<alloc::vec::Vec<u8>, &mut &[u8]>>
Line
Count
Source
1325
226k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
226k
            key_merge: KM,
1327
226k
            val_merge: VM,
1328
226k
            val_default: V,
1329
226k
            values: &mut $map_ty<K, V>,
1330
226k
            buf: &mut B,
1331
226k
            ctx: DecodeContext,
1332
226k
        ) -> Result<(), DecodeError>
1333
226k
        where
1334
226k
            K: Default + Eq + Hash + Ord,
1335
226k
            B: Buf,
1336
226k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
226k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
226k
            let mut key = Default::default();
1340
226k
            let mut val = val_default;
1341
226k
            ctx.limit_reached()?;
1342
226k
            merge_loop(
1343
226k
                &mut (&mut key, &mut val),
1344
226k
                buf,
1345
226k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
228
            )?;
1355
226k
            values.insert(key, val);
1356
1357
226k
            Ok(())
1358
226k
        }
prost::encoding::btree_map::merge_with_default::<alloc::string::String, protobuf::test_messages::proto2::ForeignMessageProto2, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto2::ForeignMessageProto2, &mut &[u8]>>
Line
Count
Source
1325
165k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
165k
            key_merge: KM,
1327
165k
            val_merge: VM,
1328
165k
            val_default: V,
1329
165k
            values: &mut $map_ty<K, V>,
1330
165k
            buf: &mut B,
1331
165k
            ctx: DecodeContext,
1332
165k
        ) -> Result<(), DecodeError>
1333
165k
        where
1334
165k
            K: Default + Eq + Hash + Ord,
1335
165k
            B: Buf,
1336
165k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
165k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
165k
            let mut key = Default::default();
1340
165k
            let mut val = val_default;
1341
165k
            ctx.limit_reached()?;
1342
165k
            merge_loop(
1343
165k
                &mut (&mut key, &mut val),
1344
165k
                buf,
1345
165k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
184
            )?;
1355
164k
            values.insert(key, val);
1356
1357
164k
            Ok(())
1358
165k
        }
prost::encoding::btree_map::merge_with_default::<alloc::string::String, protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::message::merge<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, &mut &[u8]>>
Line
Count
Source
1325
249k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
249k
            key_merge: KM,
1327
249k
            val_merge: VM,
1328
249k
            val_default: V,
1329
249k
            values: &mut $map_ty<K, V>,
1330
249k
            buf: &mut B,
1331
249k
            ctx: DecodeContext,
1332
249k
        ) -> Result<(), DecodeError>
1333
249k
        where
1334
249k
            K: Default + Eq + Hash + Ord,
1335
249k
            B: Buf,
1336
249k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
249k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
249k
            let mut key = Default::default();
1340
249k
            let mut val = val_default;
1341
249k
            ctx.limit_reached()?;
1342
249k
            merge_loop(
1343
249k
                &mut (&mut key, &mut val),
1344
249k
                buf,
1345
249k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
1.02k
            )?;
1355
248k
            values.insert(key, val);
1356
1357
248k
            Ok(())
1358
249k
        }
prost::encoding::btree_map::merge_with_default::<alloc::string::String, i32, &mut &[u8], prost::encoding::string::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>
Line
Count
Source
1325
267k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
267k
            key_merge: KM,
1327
267k
            val_merge: VM,
1328
267k
            val_default: V,
1329
267k
            values: &mut $map_ty<K, V>,
1330
267k
            buf: &mut B,
1331
267k
            ctx: DecodeContext,
1332
267k
        ) -> Result<(), DecodeError>
1333
267k
        where
1334
267k
            K: Default + Eq + Hash + Ord,
1335
267k
            B: Buf,
1336
267k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
267k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
267k
            let mut key = Default::default();
1340
267k
            let mut val = val_default;
1341
267k
            ctx.limit_reached()?;
1342
267k
            merge_loop(
1343
267k
                &mut (&mut key, &mut val),
1344
267k
                buf,
1345
267k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
227
            )?;
1355
266k
            values.insert(key, val);
1356
1357
266k
            Ok(())
1358
267k
        }
prost::encoding::btree_map::merge_with_default::<bool, bool, &mut &[u8], prost::encoding::bool::merge<&mut &[u8]>, prost::encoding::bool::merge<&mut &[u8]>>
Line
Count
Source
1325
11.7k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
11.7k
            key_merge: KM,
1327
11.7k
            val_merge: VM,
1328
11.7k
            val_default: V,
1329
11.7k
            values: &mut $map_ty<K, V>,
1330
11.7k
            buf: &mut B,
1331
11.7k
            ctx: DecodeContext,
1332
11.7k
        ) -> Result<(), DecodeError>
1333
11.7k
        where
1334
11.7k
            K: Default + Eq + Hash + Ord,
1335
11.7k
            B: Buf,
1336
11.7k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
11.7k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
11.7k
            let mut key = Default::default();
1340
11.7k
            let mut val = val_default;
1341
11.7k
            ctx.limit_reached()?;
1342
11.7k
            merge_loop(
1343
11.7k
                &mut (&mut key, &mut val),
1344
11.7k
                buf,
1345
11.7k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
180
            )?;
1355
11.5k
            values.insert(key, val);
1356
1357
11.5k
            Ok(())
1358
11.7k
        }
prost::encoding::btree_map::merge_with_default::<i32, f64, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::double::merge<&mut &[u8]>>
Line
Count
Source
1325
167k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
167k
            key_merge: KM,
1327
167k
            val_merge: VM,
1328
167k
            val_default: V,
1329
167k
            values: &mut $map_ty<K, V>,
1330
167k
            buf: &mut B,
1331
167k
            ctx: DecodeContext,
1332
167k
        ) -> Result<(), DecodeError>
1333
167k
        where
1334
167k
            K: Default + Eq + Hash + Ord,
1335
167k
            B: Buf,
1336
167k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
167k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
167k
            let mut key = Default::default();
1340
167k
            let mut val = val_default;
1341
167k
            ctx.limit_reached()?;
1342
167k
            merge_loop(
1343
167k
                &mut (&mut key, &mut val),
1344
167k
                buf,
1345
167k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
218
            )?;
1355
167k
            values.insert(key, val);
1356
1357
167k
            Ok(())
1358
167k
        }
prost::encoding::btree_map::merge_with_default::<i32, f32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::float::merge<&mut &[u8]>>
Line
Count
Source
1325
170k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
170k
            key_merge: KM,
1327
170k
            val_merge: VM,
1328
170k
            val_default: V,
1329
170k
            values: &mut $map_ty<K, V>,
1330
170k
            buf: &mut B,
1331
170k
            ctx: DecodeContext,
1332
170k
        ) -> Result<(), DecodeError>
1333
170k
        where
1334
170k
            K: Default + Eq + Hash + Ord,
1335
170k
            B: Buf,
1336
170k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
170k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
170k
            let mut key = Default::default();
1340
170k
            let mut val = val_default;
1341
170k
            ctx.limit_reached()?;
1342
170k
            merge_loop(
1343
170k
                &mut (&mut key, &mut val),
1344
170k
                buf,
1345
170k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
188
            )?;
1355
170k
            values.insert(key, val);
1356
1357
170k
            Ok(())
1358
170k
        }
prost::encoding::btree_map::merge_with_default::<i32, i32, &mut &[u8], prost::encoding::int32::merge<&mut &[u8]>, prost::encoding::int32::merge<&mut &[u8]>>
Line
Count
Source
1325
8.08k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
8.08k
            key_merge: KM,
1327
8.08k
            val_merge: VM,
1328
8.08k
            val_default: V,
1329
8.08k
            values: &mut $map_ty<K, V>,
1330
8.08k
            buf: &mut B,
1331
8.08k
            ctx: DecodeContext,
1332
8.08k
        ) -> Result<(), DecodeError>
1333
8.08k
        where
1334
8.08k
            K: Default + Eq + Hash + Ord,
1335
8.08k
            B: Buf,
1336
8.08k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
8.08k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
8.08k
            let mut key = Default::default();
1340
8.08k
            let mut val = val_default;
1341
8.08k
            ctx.limit_reached()?;
1342
8.08k
            merge_loop(
1343
8.08k
                &mut (&mut key, &mut val),
1344
8.08k
                buf,
1345
8.08k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
69
            )?;
1355
8.01k
            values.insert(key, val);
1356
1357
8.01k
            Ok(())
1358
8.08k
        }
prost::encoding::btree_map::merge_with_default::<i32, i32, &mut &[u8], prost::encoding::sint32::merge<&mut &[u8]>, prost::encoding::sint32::merge<&mut &[u8]>>
Line
Count
Source
1325
37.6k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
37.6k
            key_merge: KM,
1327
37.6k
            val_merge: VM,
1328
37.6k
            val_default: V,
1329
37.6k
            values: &mut $map_ty<K, V>,
1330
37.6k
            buf: &mut B,
1331
37.6k
            ctx: DecodeContext,
1332
37.6k
        ) -> Result<(), DecodeError>
1333
37.6k
        where
1334
37.6k
            K: Default + Eq + Hash + Ord,
1335
37.6k
            B: Buf,
1336
37.6k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
37.6k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
37.6k
            let mut key = Default::default();
1340
37.6k
            let mut val = val_default;
1341
37.6k
            ctx.limit_reached()?;
1342
37.6k
            merge_loop(
1343
37.6k
                &mut (&mut key, &mut val),
1344
37.6k
                buf,
1345
37.6k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
191
            )?;
1355
37.4k
            values.insert(key, val);
1356
1357
37.4k
            Ok(())
1358
37.6k
        }
prost::encoding::btree_map::merge_with_default::<i32, i32, &mut &[u8], prost::encoding::sfixed32::merge<&mut &[u8]>, prost::encoding::sfixed32::merge<&mut &[u8]>>
Line
Count
Source
1325
166k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
166k
            key_merge: KM,
1327
166k
            val_merge: VM,
1328
166k
            val_default: V,
1329
166k
            values: &mut $map_ty<K, V>,
1330
166k
            buf: &mut B,
1331
166k
            ctx: DecodeContext,
1332
166k
        ) -> Result<(), DecodeError>
1333
166k
        where
1334
166k
            K: Default + Eq + Hash + Ord,
1335
166k
            B: Buf,
1336
166k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
166k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
166k
            let mut key = Default::default();
1340
166k
            let mut val = val_default;
1341
166k
            ctx.limit_reached()?;
1342
166k
            merge_loop(
1343
166k
                &mut (&mut key, &mut val),
1344
166k
                buf,
1345
166k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
196
            )?;
1355
166k
            values.insert(key, val);
1356
1357
166k
            Ok(())
1358
166k
        }
prost::encoding::btree_map::merge_with_default::<u32, u32, &mut &[u8], prost::encoding::uint32::merge<&mut &[u8]>, prost::encoding::uint32::merge<&mut &[u8]>>
Line
Count
Source
1325
14.3k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
14.3k
            key_merge: KM,
1327
14.3k
            val_merge: VM,
1328
14.3k
            val_default: V,
1329
14.3k
            values: &mut $map_ty<K, V>,
1330
14.3k
            buf: &mut B,
1331
14.3k
            ctx: DecodeContext,
1332
14.3k
        ) -> Result<(), DecodeError>
1333
14.3k
        where
1334
14.3k
            K: Default + Eq + Hash + Ord,
1335
14.3k
            B: Buf,
1336
14.3k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
14.3k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
14.3k
            let mut key = Default::default();
1340
14.3k
            let mut val = val_default;
1341
14.3k
            ctx.limit_reached()?;
1342
14.3k
            merge_loop(
1343
14.3k
                &mut (&mut key, &mut val),
1344
14.3k
                buf,
1345
14.3k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
85
            )?;
1355
14.2k
            values.insert(key, val);
1356
1357
14.2k
            Ok(())
1358
14.3k
        }
prost::encoding::btree_map::merge_with_default::<u32, u32, &mut &[u8], prost::encoding::fixed32::merge<&mut &[u8]>, prost::encoding::fixed32::merge<&mut &[u8]>>
Line
Count
Source
1325
255k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
255k
            key_merge: KM,
1327
255k
            val_merge: VM,
1328
255k
            val_default: V,
1329
255k
            values: &mut $map_ty<K, V>,
1330
255k
            buf: &mut B,
1331
255k
            ctx: DecodeContext,
1332
255k
        ) -> Result<(), DecodeError>
1333
255k
        where
1334
255k
            K: Default + Eq + Hash + Ord,
1335
255k
            B: Buf,
1336
255k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
255k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
255k
            let mut key = Default::default();
1340
255k
            let mut val = val_default;
1341
255k
            ctx.limit_reached()?;
1342
255k
            merge_loop(
1343
255k
                &mut (&mut key, &mut val),
1344
255k
                buf,
1345
255k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
225
            )?;
1355
254k
            values.insert(key, val);
1356
1357
254k
            Ok(())
1358
255k
        }
prost::encoding::btree_map::merge_with_default::<i64, i64, &mut &[u8], prost::encoding::int64::merge<&mut &[u8]>, prost::encoding::int64::merge<&mut &[u8]>>
Line
Count
Source
1325
38.9k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
38.9k
            key_merge: KM,
1327
38.9k
            val_merge: VM,
1328
38.9k
            val_default: V,
1329
38.9k
            values: &mut $map_ty<K, V>,
1330
38.9k
            buf: &mut B,
1331
38.9k
            ctx: DecodeContext,
1332
38.9k
        ) -> Result<(), DecodeError>
1333
38.9k
        where
1334
38.9k
            K: Default + Eq + Hash + Ord,
1335
38.9k
            B: Buf,
1336
38.9k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
38.9k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
38.9k
            let mut key = Default::default();
1340
38.9k
            let mut val = val_default;
1341
38.9k
            ctx.limit_reached()?;
1342
38.9k
            merge_loop(
1343
38.9k
                &mut (&mut key, &mut val),
1344
38.9k
                buf,
1345
38.9k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
202
            )?;
1355
38.7k
            values.insert(key, val);
1356
1357
38.7k
            Ok(())
1358
38.9k
        }
prost::encoding::btree_map::merge_with_default::<i64, i64, &mut &[u8], prost::encoding::sint64::merge<&mut &[u8]>, prost::encoding::sint64::merge<&mut &[u8]>>
Line
Count
Source
1325
28.1k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
28.1k
            key_merge: KM,
1327
28.1k
            val_merge: VM,
1328
28.1k
            val_default: V,
1329
28.1k
            values: &mut $map_ty<K, V>,
1330
28.1k
            buf: &mut B,
1331
28.1k
            ctx: DecodeContext,
1332
28.1k
        ) -> Result<(), DecodeError>
1333
28.1k
        where
1334
28.1k
            K: Default + Eq + Hash + Ord,
1335
28.1k
            B: Buf,
1336
28.1k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
28.1k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
28.1k
            let mut key = Default::default();
1340
28.1k
            let mut val = val_default;
1341
28.1k
            ctx.limit_reached()?;
1342
28.1k
            merge_loop(
1343
28.1k
                &mut (&mut key, &mut val),
1344
28.1k
                buf,
1345
28.1k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
192
            )?;
1355
27.9k
            values.insert(key, val);
1356
1357
27.9k
            Ok(())
1358
28.1k
        }
prost::encoding::btree_map::merge_with_default::<i64, i64, &mut &[u8], prost::encoding::sfixed64::merge<&mut &[u8]>, prost::encoding::sfixed64::merge<&mut &[u8]>>
Line
Count
Source
1325
196k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
196k
            key_merge: KM,
1327
196k
            val_merge: VM,
1328
196k
            val_default: V,
1329
196k
            values: &mut $map_ty<K, V>,
1330
196k
            buf: &mut B,
1331
196k
            ctx: DecodeContext,
1332
196k
        ) -> Result<(), DecodeError>
1333
196k
        where
1334
196k
            K: Default + Eq + Hash + Ord,
1335
196k
            B: Buf,
1336
196k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
196k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
196k
            let mut key = Default::default();
1340
196k
            let mut val = val_default;
1341
196k
            ctx.limit_reached()?;
1342
196k
            merge_loop(
1343
196k
                &mut (&mut key, &mut val),
1344
196k
                buf,
1345
196k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
210
            )?;
1355
196k
            values.insert(key, val);
1356
1357
196k
            Ok(())
1358
196k
        }
prost::encoding::btree_map::merge_with_default::<u64, u64, &mut &[u8], prost::encoding::uint64::merge<&mut &[u8]>, prost::encoding::uint64::merge<&mut &[u8]>>
Line
Count
Source
1325
76.9k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
76.9k
            key_merge: KM,
1327
76.9k
            val_merge: VM,
1328
76.9k
            val_default: V,
1329
76.9k
            values: &mut $map_ty<K, V>,
1330
76.9k
            buf: &mut B,
1331
76.9k
            ctx: DecodeContext,
1332
76.9k
        ) -> Result<(), DecodeError>
1333
76.9k
        where
1334
76.9k
            K: Default + Eq + Hash + Ord,
1335
76.9k
            B: Buf,
1336
76.9k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
76.9k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
76.9k
            let mut key = Default::default();
1340
76.9k
            let mut val = val_default;
1341
76.9k
            ctx.limit_reached()?;
1342
76.9k
            merge_loop(
1343
76.9k
                &mut (&mut key, &mut val),
1344
76.9k
                buf,
1345
76.9k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
143
            )?;
1355
76.8k
            values.insert(key, val);
1356
1357
76.8k
            Ok(())
1358
76.9k
        }
prost::encoding::btree_map::merge_with_default::<u64, u64, &mut &[u8], prost::encoding::fixed64::merge<&mut &[u8]>, prost::encoding::fixed64::merge<&mut &[u8]>>
Line
Count
Source
1325
173k
        pub fn merge_with_default<K, V, B, KM, VM>(
1326
173k
            key_merge: KM,
1327
173k
            val_merge: VM,
1328
173k
            val_default: V,
1329
173k
            values: &mut $map_ty<K, V>,
1330
173k
            buf: &mut B,
1331
173k
            ctx: DecodeContext,
1332
173k
        ) -> Result<(), DecodeError>
1333
173k
        where
1334
173k
            K: Default + Eq + Hash + Ord,
1335
173k
            B: Buf,
1336
173k
            KM: Fn(WireType, &mut K, &mut B, DecodeContext) -> Result<(), DecodeError>,
1337
173k
            VM: Fn(WireType, &mut V, &mut B, DecodeContext) -> Result<(), DecodeError>,
1338
        {
1339
173k
            let mut key = Default::default();
1340
173k
            let mut val = val_default;
1341
173k
            ctx.limit_reached()?;
1342
173k
            merge_loop(
1343
173k
                &mut (&mut key, &mut val),
1344
173k
                buf,
1345
173k
                ctx.enter_recursion(),
1346
                |&mut (ref mut key, ref mut val), buf, ctx| {
1347
                    let (tag, wire_type) = decode_key(buf)?;
1348
                    match tag {
1349
                        1 => key_merge(wire_type, key, buf, ctx),
1350
                        2 => val_merge(wire_type, val, buf, ctx),
1351
                        _ => skip_field(wire_type, tag, buf, ctx),
1352
                    }
1353
                },
1354
206
            )?;
1355
173k
            values.insert(key, val);
1356
1357
173k
            Ok(())
1358
173k
        }
1359
1360
        /// Generic protobuf map encode function with an overriden value default.
1361
        ///
1362
        /// This is necessary because enumeration values can have a default value other
1363
        /// than 0 in proto2.
1364
42.7M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
42.7M
            key_encoded_len: KL,
1366
42.7M
            val_encoded_len: VL,
1367
42.7M
            val_default: &V,
1368
42.7M
            tag: u32,
1369
42.7M
            values: &$map_ty<K, V>,
1370
42.7M
        ) -> usize
1371
42.7M
        where
1372
42.7M
            K: Default + Eq + Hash + Ord,
1373
42.7M
            V: PartialEq,
1374
42.7M
            KL: Fn(u32, &K) -> usize,
1375
42.7M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
42.7M
            key_len(tag) * values.len()
1378
42.7M
                + values
1379
42.7M
                    .iter()
1380
42.7M
                    .map(|(key, val)| {
1381
2.30M
                        let len = (if key == &K::default() {
1382
993k
                            0
1383
                        } else {
1384
1.30M
                            key_encoded_len(1, key)
1385
2.30M
                        }) + (if val == val_default {
1386
2.10M
                            0
1387
                        } else {
1388
200k
                            val_encoded_len(2, val)
1389
                        });
1390
2.30M
                        encoded_len_varint(len as u64) + len
1391
2.30M
                    })
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, alloc::string::String, prost::encoding::string::encoded_len, prost::encoding::string::encoded_len>::{closure#0}
Line
Count
Source
1380
202k
                    .map(|(key, val)| {
1381
202k
                        let len = (if key == &K::default() {
1382
178k
                            0
1383
                        } else {
1384
23.1k
                            key_encoded_len(1, key)
1385
202k
                        }) + (if val == val_default {
1386
197k
                            0
1387
                        } else {
1388
4.44k
                            val_encoded_len(2, val)
1389
                        });
1390
202k
                        encoded_len_varint(len as u64) + len
1391
202k
                    })
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, alloc::vec::Vec<u8>, prost::encoding::string::encoded_len, prost::encoding::bytes::encoded_len<alloc::vec::Vec<u8>>>::{closure#0}
Line
Count
Source
1380
109k
                    .map(|(key, val)| {
1381
109k
                        let len = (if key == &K::default() {
1382
32.7k
                            0
1383
                        } else {
1384
76.7k
                            key_encoded_len(1, key)
1385
109k
                        }) + (if val == val_default {
1386
101k
                            0
1387
                        } else {
1388
8.18k
                            val_encoded_len(2, val)
1389
                        });
1390
109k
                        encoded_len_varint(len as u64) + len
1391
109k
                    })
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, prost_types::Value, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<prost_types::Value>>::{closure#0}
Line
Count
Source
1380
78.0k
                    .map(|(key, val)| {
1381
78.0k
                        let len = (if key == &K::default() {
1382
32.4k
                            0
1383
                        } else {
1384
45.5k
                            key_encoded_len(1, key)
1385
78.0k
                        }) + (if val == val_default {
1386
58.1k
                            0
1387
                        } else {
1388
19.9k
                            val_encoded_len(2, val)
1389
                        });
1390
78.0k
                        encoded_len_varint(len as u64) + len
1391
78.0k
                    })
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, protobuf::test_messages::proto3::ForeignMessage, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<protobuf::test_messages::proto3::ForeignMessage>>::{closure#0}
Line
Count
Source
1380
86.6k
                    .map(|(key, val)| {
1381
86.6k
                        let len = (if key == &K::default() {
1382
41.1k
                            0
1383
                        } else {
1384
45.4k
                            key_encoded_len(1, key)
1385
86.6k
                        }) + (if val == val_default {
1386
84.1k
                            0
1387
                        } else {
1388
2.49k
                            val_encoded_len(2, val)
1389
                        });
1390
86.6k
                        encoded_len_varint(len as u64) + len
1391
86.6k
                    })
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>>::{closure#0}
Line
Count
Source
1380
94.2k
                    .map(|(key, val)| {
1381
94.2k
                        let len = (if key == &K::default() {
1382
19.8k
                            0
1383
                        } else {
1384
74.4k
                            key_encoded_len(1, key)
1385
94.2k
                        }) + (if val == val_default {
1386
86.4k
                            0
1387
                        } else {
1388
7.78k
                            val_encoded_len(2, val)
1389
                        });
1390
94.2k
                        encoded_len_varint(len as u64) + len
1391
94.2k
                    })
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, i32, prost::encoding::string::encoded_len, prost::encoding::int32::encoded_len>::{closure#0}
Line
Count
Source
1380
91.3k
                    .map(|(key, val)| {
1381
91.3k
                        let len = (if key == &K::default() {
1382
49.7k
                            0
1383
                        } else {
1384
41.6k
                            key_encoded_len(1, key)
1385
91.3k
                        }) + (if val == val_default {
1386
89.5k
                            0
1387
                        } else {
1388
1.76k
                            val_encoded_len(2, val)
1389
                        });
1390
91.3k
                        encoded_len_varint(len as u64) + len
1391
91.3k
                    })
prost::encoding::btree_map::encoded_len_with_default::<bool, bool, prost::encoding::bool::encoded_len, prost::encoding::bool::encoded_len>::{closure#0}
Line
Count
Source
1380
57.4k
                    .map(|(key, val)| {
1381
57.4k
                        let len = (if key == &K::default() {
1382
48.1k
                            0
1383
                        } else {
1384
9.35k
                            key_encoded_len(1, key)
1385
57.4k
                        }) + (if val == val_default {
1386
57.1k
                            0
1387
                        } else {
1388
267
                            val_encoded_len(2, val)
1389
                        });
1390
57.4k
                        encoded_len_varint(len as u64) + len
1391
57.4k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i32, f64, prost::encoding::int32::encoded_len, prost::encoding::double::encoded_len>::{closure#0}
Line
Count
Source
1380
94.3k
                    .map(|(key, val)| {
1381
94.3k
                        let len = (if key == &K::default() {
1382
39.6k
                            0
1383
                        } else {
1384
54.6k
                            key_encoded_len(1, key)
1385
94.3k
                        }) + (if val == val_default {
1386
93.7k
                            0
1387
                        } else {
1388
663
                            val_encoded_len(2, val)
1389
                        });
1390
94.3k
                        encoded_len_varint(len as u64) + len
1391
94.3k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i32, f32, prost::encoding::int32::encoded_len, prost::encoding::float::encoded_len>::{closure#0}
Line
Count
Source
1380
128k
                    .map(|(key, val)| {
1381
128k
                        let len = (if key == &K::default() {
1382
33.2k
                            0
1383
                        } else {
1384
95.2k
                            key_encoded_len(1, key)
1385
128k
                        }) + (if val == val_default {
1386
89.5k
                            0
1387
                        } else {
1388
38.9k
                            val_encoded_len(2, val)
1389
                        });
1390
128k
                        encoded_len_varint(len as u64) + len
1391
128k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i32, i32, prost::encoding::int32::encoded_len, prost::encoding::int32::encoded_len>::{closure#0}
Line
Count
Source
1380
24.9k
                    .map(|(key, val)| {
1381
24.9k
                        let len = (if key == &K::default() {
1382
11.3k
                            0
1383
                        } else {
1384
13.5k
                            key_encoded_len(1, key)
1385
24.9k
                        }) + (if val == val_default {
1386
20.8k
                            0
1387
                        } else {
1388
4.15k
                            val_encoded_len(2, val)
1389
                        });
1390
24.9k
                        encoded_len_varint(len as u64) + len
1391
24.9k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i32, i32, prost::encoding::sint32::encoded_len, prost::encoding::sint32::encoded_len>::{closure#0}
Line
Count
Source
1380
32.9k
                    .map(|(key, val)| {
1381
32.9k
                        let len = (if key == &K::default() {
1382
7.91k
                            0
1383
                        } else {
1384
25.0k
                            key_encoded_len(1, key)
1385
32.9k
                        }) + (if val == val_default {
1386
30.7k
                            0
1387
                        } else {
1388
2.18k
                            val_encoded_len(2, val)
1389
                        });
1390
32.9k
                        encoded_len_varint(len as u64) + len
1391
32.9k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i32, i32, prost::encoding::sfixed32::encoded_len, prost::encoding::sfixed32::encoded_len>::{closure#0}
Line
Count
Source
1380
75.8k
                    .map(|(key, val)| {
1381
75.8k
                        let len = (if key == &K::default() {
1382
61.0k
                            0
1383
                        } else {
1384
14.7k
                            key_encoded_len(1, key)
1385
75.8k
                        }) + (if val == val_default {
1386
60.8k
                            0
1387
                        } else {
1388
14.9k
                            val_encoded_len(2, val)
1389
                        });
1390
75.8k
                        encoded_len_varint(len as u64) + len
1391
75.8k
                    })
prost::encoding::btree_map::encoded_len_with_default::<u32, u32, prost::encoding::uint32::encoded_len, prost::encoding::uint32::encoded_len>::{closure#0}
Line
Count
Source
1380
53.9k
                    .map(|(key, val)| {
1381
53.9k
                        let len = (if key == &K::default() {
1382
12.3k
                            0
1383
                        } else {
1384
41.5k
                            key_encoded_len(1, key)
1385
53.9k
                        }) + (if val == val_default {
1386
49.0k
                            0
1387
                        } else {
1388
4.87k
                            val_encoded_len(2, val)
1389
                        });
1390
53.9k
                        encoded_len_varint(len as u64) + len
1391
53.9k
                    })
prost::encoding::btree_map::encoded_len_with_default::<u32, u32, prost::encoding::fixed32::encoded_len, prost::encoding::fixed32::encoded_len>::{closure#0}
Line
Count
Source
1380
34.4k
                    .map(|(key, val)| {
1381
34.4k
                        let len = (if key == &K::default() {
1382
23.1k
                            0
1383
                        } else {
1384
11.3k
                            key_encoded_len(1, key)
1385
34.4k
                        }) + (if val == val_default {
1386
33.1k
                            0
1387
                        } else {
1388
1.28k
                            val_encoded_len(2, val)
1389
                        });
1390
34.4k
                        encoded_len_varint(len as u64) + len
1391
34.4k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i64, i64, prost::encoding::int64::encoded_len, prost::encoding::int64::encoded_len>::{closure#0}
Line
Count
Source
1380
20.7k
                    .map(|(key, val)| {
1381
20.7k
                        let len = (if key == &K::default() {
1382
14.4k
                            0
1383
                        } else {
1384
6.28k
                            key_encoded_len(1, key)
1385
20.7k
                        }) + (if val == val_default {
1386
18.8k
                            0
1387
                        } else {
1388
1.90k
                            val_encoded_len(2, val)
1389
                        });
1390
20.7k
                        encoded_len_varint(len as u64) + len
1391
20.7k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i64, i64, prost::encoding::sint64::encoded_len, prost::encoding::sint64::encoded_len>::{closure#0}
Line
Count
Source
1380
43.8k
                    .map(|(key, val)| {
1381
43.8k
                        let len = (if key == &K::default() {
1382
11.5k
                            0
1383
                        } else {
1384
32.3k
                            key_encoded_len(1, key)
1385
43.8k
                        }) + (if val == val_default {
1386
41.9k
                            0
1387
                        } else {
1388
1.93k
                            val_encoded_len(2, val)
1389
                        });
1390
43.8k
                        encoded_len_varint(len as u64) + len
1391
43.8k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i64, i64, prost::encoding::sfixed64::encoded_len, prost::encoding::sfixed64::encoded_len>::{closure#0}
Line
Count
Source
1380
41.7k
                    .map(|(key, val)| {
1381
41.7k
                        let len = (if key == &K::default() {
1382
21.1k
                            0
1383
                        } else {
1384
20.5k
                            key_encoded_len(1, key)
1385
41.7k
                        }) + (if val == val_default {
1386
40.7k
                            0
1387
                        } else {
1388
1.02k
                            val_encoded_len(2, val)
1389
                        });
1390
41.7k
                        encoded_len_varint(len as u64) + len
1391
41.7k
                    })
prost::encoding::btree_map::encoded_len_with_default::<u64, u64, prost::encoding::uint64::encoded_len, prost::encoding::uint64::encoded_len>::{closure#0}
Line
Count
Source
1380
90.0k
                    .map(|(key, val)| {
1381
90.0k
                        let len = (if key == &K::default() {
1382
46.0k
                            0
1383
                        } else {
1384
44.0k
                            key_encoded_len(1, key)
1385
90.0k
                        }) + (if val == val_default {
1386
87.9k
                            0
1387
                        } else {
1388
2.02k
                            val_encoded_len(2, val)
1389
                        });
1390
90.0k
                        encoded_len_varint(len as u64) + len
1391
90.0k
                    })
prost::encoding::btree_map::encoded_len_with_default::<u64, u64, prost::encoding::fixed64::encoded_len, prost::encoding::fixed64::encoded_len>::{closure#0}
Line
Count
Source
1380
30.3k
                    .map(|(key, val)| {
1381
30.3k
                        let len = (if key == &K::default() {
1382
13.0k
                            0
1383
                        } else {
1384
17.2k
                            key_encoded_len(1, key)
1385
30.3k
                        }) + (if val == val_default {
1386
28.4k
                            0
1387
                        } else {
1388
1.84k
                            val_encoded_len(2, val)
1389
                        });
1390
30.3k
                        encoded_len_varint(len as u64) + len
1391
30.3k
                    })
Unexecuted instantiation: prost::encoding::hash_map::encoded_len_with_default::<_, _, _, _>::{closure#0}
Unexecuted instantiation: prost::encoding::btree_map::encoded_len_with_default::<_, _, _, _>::{closure#0}
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, alloc::string::String, prost::encoding::string::encoded_len, prost::encoding::string::encoded_len>::{closure#0}
Line
Count
Source
1380
48.8k
                    .map(|(key, val)| {
1381
48.8k
                        let len = (if key == &K::default() {
1382
27.0k
                            0
1383
                        } else {
1384
21.8k
                            key_encoded_len(1, key)
1385
48.8k
                        }) + (if val == val_default {
1386
27.7k
                            0
1387
                        } else {
1388
21.1k
                            val_encoded_len(2, val)
1389
                        });
1390
48.8k
                        encoded_len_varint(len as u64) + len
1391
48.8k
                    })
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, alloc::vec::Vec<u8>, prost::encoding::string::encoded_len, prost::encoding::bytes::encoded_len<alloc::vec::Vec<u8>>>::{closure#0}
Line
Count
Source
1380
39.7k
                    .map(|(key, val)| {
1381
39.7k
                        let len = (if key == &K::default() {
1382
7.58k
                            0
1383
                        } else {
1384
32.1k
                            key_encoded_len(1, key)
1385
39.7k
                        }) + (if val == val_default {
1386
37.8k
                            0
1387
                        } else {
1388
1.87k
                            val_encoded_len(2, val)
1389
                        });
1390
39.7k
                        encoded_len_varint(len as u64) + len
1391
39.7k
                    })
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, protobuf::test_messages::proto2::ForeignMessageProto2, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<protobuf::test_messages::proto2::ForeignMessageProto2>>::{closure#0}
Line
Count
Source
1380
55.4k
                    .map(|(key, val)| {
1381
55.4k
                        let len = (if key == &K::default() {
1382
22.1k
                            0
1383
                        } else {
1384
33.2k
                            key_encoded_len(1, key)
1385
55.4k
                        }) + (if val == val_default {
1386
52.4k
                            0
1387
                        } else {
1388
2.95k
                            val_encoded_len(2, val)
1389
                        });
1390
55.4k
                        encoded_len_varint(len as u64) + len
1391
55.4k
                    })
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>>::{closure#0}
Line
Count
Source
1380
107k
                    .map(|(key, val)| {
1381
107k
                        let len = (if key == &K::default() {
1382
68.1k
                            0
1383
                        } else {
1384
39.8k
                            key_encoded_len(1, key)
1385
107k
                        }) + (if val == val_default {
1386
87.7k
                            0
1387
                        } else {
1388
20.1k
                            val_encoded_len(2, val)
1389
                        });
1390
107k
                        encoded_len_varint(len as u64) + len
1391
107k
                    })
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, i32, prost::encoding::string::encoded_len, prost::encoding::int32::encoded_len>::{closure#0}
Line
Count
Source
1380
62.4k
                    .map(|(key, val)| {
1381
62.4k
                        let len = (if key == &K::default() {
1382
14.4k
                            0
1383
                        } else {
1384
47.9k
                            key_encoded_len(1, key)
1385
62.4k
                        }) + (if val == val_default {
1386
58.8k
                            0
1387
                        } else {
1388
3.52k
                            val_encoded_len(2, val)
1389
                        });
1390
62.4k
                        encoded_len_varint(len as u64) + len
1391
62.4k
                    })
prost::encoding::btree_map::encoded_len_with_default::<bool, bool, prost::encoding::bool::encoded_len, prost::encoding::bool::encoded_len>::{closure#0}
Line
Count
Source
1380
18.0k
                    .map(|(key, val)| {
1381
18.0k
                        let len = (if key == &K::default() {
1382
11.2k
                            0
1383
                        } else {
1384
6.85k
                            key_encoded_len(1, key)
1385
18.0k
                        }) + (if val == val_default {
1386
15.5k
                            0
1387
                        } else {
1388
2.47k
                            val_encoded_len(2, val)
1389
                        });
1390
18.0k
                        encoded_len_varint(len as u64) + len
1391
18.0k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i32, f64, prost::encoding::int32::encoded_len, prost::encoding::double::encoded_len>::{closure#0}
Line
Count
Source
1380
103k
                    .map(|(key, val)| {
1381
103k
                        let len = (if key == &K::default() {
1382
39.3k
                            0
1383
                        } else {
1384
63.8k
                            key_encoded_len(1, key)
1385
103k
                        }) + (if val == val_default {
1386
100k
                            0
1387
                        } else {
1388
2.35k
                            val_encoded_len(2, val)
1389
                        });
1390
103k
                        encoded_len_varint(len as u64) + len
1391
103k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i32, f32, prost::encoding::int32::encoded_len, prost::encoding::float::encoded_len>::{closure#0}
Line
Count
Source
1380
86.0k
                    .map(|(key, val)| {
1381
86.0k
                        let len = (if key == &K::default() {
1382
19.4k
                            0
1383
                        } else {
1384
66.6k
                            key_encoded_len(1, key)
1385
86.0k
                        }) + (if val == val_default {
1386
84.5k
                            0
1387
                        } else {
1388
1.55k
                            val_encoded_len(2, val)
1389
                        });
1390
86.0k
                        encoded_len_varint(len as u64) + len
1391
86.0k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i32, i32, prost::encoding::int32::encoded_len, prost::encoding::int32::encoded_len>::{closure#0}
Line
Count
Source
1380
17.0k
                    .map(|(key, val)| {
1381
17.0k
                        let len = (if key == &K::default() {
1382
6.22k
                            0
1383
                        } else {
1384
10.8k
                            key_encoded_len(1, key)
1385
17.0k
                        }) + (if val == val_default {
1386
15.2k
                            0
1387
                        } else {
1388
1.78k
                            val_encoded_len(2, val)
1389
                        });
1390
17.0k
                        encoded_len_varint(len as u64) + len
1391
17.0k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i32, i32, prost::encoding::sint32::encoded_len, prost::encoding::sint32::encoded_len>::{closure#0}
Line
Count
Source
1380
79.8k
                    .map(|(key, val)| {
1381
79.8k
                        let len = (if key == &K::default() {
1382
11.6k
                            0
1383
                        } else {
1384
68.2k
                            key_encoded_len(1, key)
1385
79.8k
                        }) + (if val == val_default {
1386
78.0k
                            0
1387
                        } else {
1388
1.85k
                            val_encoded_len(2, val)
1389
                        });
1390
79.8k
                        encoded_len_varint(len as u64) + len
1391
79.8k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i32, i32, prost::encoding::sfixed32::encoded_len, prost::encoding::sfixed32::encoded_len>::{closure#0}
Line
Count
Source
1380
36.2k
                    .map(|(key, val)| {
1381
36.2k
                        let len = (if key == &K::default() {
1382
8.86k
                            0
1383
                        } else {
1384
27.3k
                            key_encoded_len(1, key)
1385
36.2k
                        }) + (if val == val_default {
1386
33.5k
                            0
1387
                        } else {
1388
2.73k
                            val_encoded_len(2, val)
1389
                        });
1390
36.2k
                        encoded_len_varint(len as u64) + len
1391
36.2k
                    })
prost::encoding::btree_map::encoded_len_with_default::<u32, u32, prost::encoding::uint32::encoded_len, prost::encoding::uint32::encoded_len>::{closure#0}
Line
Count
Source
1380
25.1k
                    .map(|(key, val)| {
1381
25.1k
                        let len = (if key == &K::default() {
1382
6.61k
                            0
1383
                        } else {
1384
18.5k
                            key_encoded_len(1, key)
1385
25.1k
                        }) + (if val == val_default {
1386
21.2k
                            0
1387
                        } else {
1388
3.98k
                            val_encoded_len(2, val)
1389
                        });
1390
25.1k
                        encoded_len_varint(len as u64) + len
1391
25.1k
                    })
prost::encoding::btree_map::encoded_len_with_default::<u32, u32, prost::encoding::fixed32::encoded_len, prost::encoding::fixed32::encoded_len>::{closure#0}
Line
Count
Source
1380
53.4k
                    .map(|(key, val)| {
1381
53.4k
                        let len = (if key == &K::default() {
1382
4.46k
                            0
1383
                        } else {
1384
48.9k
                            key_encoded_len(1, key)
1385
53.4k
                        }) + (if val == val_default {
1386
52.9k
                            0
1387
                        } else {
1388
451
                            val_encoded_len(2, val)
1389
                        });
1390
53.4k
                        encoded_len_varint(len as u64) + len
1391
53.4k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i64, i64, prost::encoding::int64::encoded_len, prost::encoding::int64::encoded_len>::{closure#0}
Line
Count
Source
1380
78.7k
                    .map(|(key, val)| {
1381
78.7k
                        let len = (if key == &K::default() {
1382
12.7k
                            0
1383
                        } else {
1384
65.9k
                            key_encoded_len(1, key)
1385
78.7k
                        }) + (if val == val_default {
1386
76.3k
                            0
1387
                        } else {
1388
2.39k
                            val_encoded_len(2, val)
1389
                        });
1390
78.7k
                        encoded_len_varint(len as u64) + len
1391
78.7k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i64, i64, prost::encoding::sint64::encoded_len, prost::encoding::sint64::encoded_len>::{closure#0}
Line
Count
Source
1380
14.0k
                    .map(|(key, val)| {
1381
14.0k
                        let len = (if key == &K::default() {
1382
8.86k
                            0
1383
                        } else {
1384
5.22k
                            key_encoded_len(1, key)
1385
14.0k
                        }) + (if val == val_default {
1386
12.2k
                            0
1387
                        } else {
1388
1.84k
                            val_encoded_len(2, val)
1389
                        });
1390
14.0k
                        encoded_len_varint(len as u64) + len
1391
14.0k
                    })
prost::encoding::btree_map::encoded_len_with_default::<i64, i64, prost::encoding::sfixed64::encoded_len, prost::encoding::sfixed64::encoded_len>::{closure#0}
Line
Count
Source
1380
43.5k
                    .map(|(key, val)| {
1381
43.5k
                        let len = (if key == &K::default() {
1382
11.7k
                            0
1383
                        } else {
1384
31.8k
                            key_encoded_len(1, key)
1385
43.5k
                        }) + (if val == val_default {
1386
38.6k
                            0
1387
                        } else {
1388
4.87k
                            val_encoded_len(2, val)
1389
                        });
1390
43.5k
                        encoded_len_varint(len as u64) + len
1391
43.5k
                    })
prost::encoding::btree_map::encoded_len_with_default::<u64, u64, prost::encoding::uint64::encoded_len, prost::encoding::uint64::encoded_len>::{closure#0}
Line
Count
Source
1380
23.9k
                    .map(|(key, val)| {
1381
23.9k
                        let len = (if key == &K::default() {
1382
8.66k
                            0
1383
                        } else {
1384
15.3k
                            key_encoded_len(1, key)
1385
23.9k
                        }) + (if val == val_default {
1386
22.1k
                            0
1387
                        } else {
1388
1.85k
                            val_encoded_len(2, val)
1389
                        });
1390
23.9k
                        encoded_len_varint(len as u64) + len
1391
23.9k
                    })
prost::encoding::btree_map::encoded_len_with_default::<u64, u64, prost::encoding::fixed64::encoded_len, prost::encoding::fixed64::encoded_len>::{closure#0}
Line
Count
Source
1380
16.9k
                    .map(|(key, val)| {
1381
16.9k
                        let len = (if key == &K::default() {
1382
6.60k
                            0
1383
                        } else {
1384
10.3k
                            key_encoded_len(1, key)
1385
16.9k
                        }) + (if val == val_default {
1386
15.3k
                            0
1387
                        } else {
1388
1.56k
                            val_encoded_len(2, val)
1389
                        });
1390
16.9k
                        encoded_len_varint(len as u64) + len
1391
16.9k
                    })
1392
42.7M
                    .sum::<usize>()
1393
42.7M
        }
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, alloc::string::String, prost::encoding::string::encoded_len, prost::encoding::string::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, alloc::vec::Vec<u8>, prost::encoding::string::encoded_len, prost::encoding::bytes::encoded_len<alloc::vec::Vec<u8>>>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, prost_types::Value, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<prost_types::Value>>
Line
Count
Source
1364
325k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
325k
            key_encoded_len: KL,
1366
325k
            val_encoded_len: VL,
1367
325k
            val_default: &V,
1368
325k
            tag: u32,
1369
325k
            values: &$map_ty<K, V>,
1370
325k
        ) -> usize
1371
325k
        where
1372
325k
            K: Default + Eq + Hash + Ord,
1373
325k
            V: PartialEq,
1374
325k
            KL: Fn(u32, &K) -> usize,
1375
325k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
325k
            key_len(tag) * values.len()
1378
325k
                + values
1379
325k
                    .iter()
1380
325k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
325k
                    .sum::<usize>()
1393
325k
        }
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, protobuf::test_messages::proto3::ForeignMessage, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<protobuf::test_messages::proto3::ForeignMessage>>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<protobuf::test_messages::proto3::test_all_types_proto3::NestedMessage>>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, i32, prost::encoding::string::encoded_len, prost::encoding::int32::encoded_len>
Line
Count
Source
1364
2.86M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
2.86M
            key_encoded_len: KL,
1366
2.86M
            val_encoded_len: VL,
1367
2.86M
            val_default: &V,
1368
2.86M
            tag: u32,
1369
2.86M
            values: &$map_ty<K, V>,
1370
2.86M
        ) -> usize
1371
2.86M
        where
1372
2.86M
            K: Default + Eq + Hash + Ord,
1373
2.86M
            V: PartialEq,
1374
2.86M
            KL: Fn(u32, &K) -> usize,
1375
2.86M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
2.86M
            key_len(tag) * values.len()
1378
2.86M
                + values
1379
2.86M
                    .iter()
1380
2.86M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
2.86M
                    .sum::<usize>()
1393
2.86M
        }
prost::encoding::btree_map::encoded_len_with_default::<bool, bool, prost::encoding::bool::encoded_len, prost::encoding::bool::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<i32, f64, prost::encoding::int32::encoded_len, prost::encoding::double::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<i32, f32, prost::encoding::int32::encoded_len, prost::encoding::float::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<i32, i32, prost::encoding::int32::encoded_len, prost::encoding::int32::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<i32, i32, prost::encoding::sint32::encoded_len, prost::encoding::sint32::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<i32, i32, prost::encoding::sfixed32::encoded_len, prost::encoding::sfixed32::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<u32, u32, prost::encoding::uint32::encoded_len, prost::encoding::uint32::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<u32, u32, prost::encoding::fixed32::encoded_len, prost::encoding::fixed32::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<i64, i64, prost::encoding::int64::encoded_len, prost::encoding::int64::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<i64, i64, prost::encoding::sint64::encoded_len, prost::encoding::sint64::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<i64, i64, prost::encoding::sfixed64::encoded_len, prost::encoding::sfixed64::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<u64, u64, prost::encoding::uint64::encoded_len, prost::encoding::uint64::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
prost::encoding::btree_map::encoded_len_with_default::<u64, u64, prost::encoding::fixed64::encoded_len, prost::encoding::fixed64::encoded_len>
Line
Count
Source
1364
1.43M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.43M
            key_encoded_len: KL,
1366
1.43M
            val_encoded_len: VL,
1367
1.43M
            val_default: &V,
1368
1.43M
            tag: u32,
1369
1.43M
            values: &$map_ty<K, V>,
1370
1.43M
        ) -> usize
1371
1.43M
        where
1372
1.43M
            K: Default + Eq + Hash + Ord,
1373
1.43M
            V: PartialEq,
1374
1.43M
            KL: Fn(u32, &K) -> usize,
1375
1.43M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.43M
            key_len(tag) * values.len()
1378
1.43M
                + values
1379
1.43M
                    .iter()
1380
1.43M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.43M
                    .sum::<usize>()
1393
1.43M
        }
Unexecuted instantiation: prost::encoding::hash_map::encoded_len_with_default::<_, _, _, _>
Unexecuted instantiation: prost::encoding::btree_map::encoded_len_with_default::<_, _, _, _>
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, alloc::string::String, prost::encoding::string::encoded_len, prost::encoding::string::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, alloc::vec::Vec<u8>, prost::encoding::string::encoded_len, prost::encoding::bytes::encoded_len<alloc::vec::Vec<u8>>>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, protobuf::test_messages::proto2::ForeignMessageProto2, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<protobuf::test_messages::proto2::ForeignMessageProto2>>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage, prost::encoding::string::encoded_len, prost::encoding::message::encoded_len<protobuf::test_messages::proto2::test_all_types_proto2::NestedMessage>>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<alloc::string::String, i32, prost::encoding::string::encoded_len, prost::encoding::int32::encoded_len>
Line
Count
Source
1364
1.60M
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
1.60M
            key_encoded_len: KL,
1366
1.60M
            val_encoded_len: VL,
1367
1.60M
            val_default: &V,
1368
1.60M
            tag: u32,
1369
1.60M
            values: &$map_ty<K, V>,
1370
1.60M
        ) -> usize
1371
1.60M
        where
1372
1.60M
            K: Default + Eq + Hash + Ord,
1373
1.60M
            V: PartialEq,
1374
1.60M
            KL: Fn(u32, &K) -> usize,
1375
1.60M
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
1.60M
            key_len(tag) * values.len()
1378
1.60M
                + values
1379
1.60M
                    .iter()
1380
1.60M
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
1.60M
                    .sum::<usize>()
1393
1.60M
        }
prost::encoding::btree_map::encoded_len_with_default::<bool, bool, prost::encoding::bool::encoded_len, prost::encoding::bool::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<i32, f64, prost::encoding::int32::encoded_len, prost::encoding::double::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<i32, f32, prost::encoding::int32::encoded_len, prost::encoding::float::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<i32, i32, prost::encoding::int32::encoded_len, prost::encoding::int32::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<i32, i32, prost::encoding::sint32::encoded_len, prost::encoding::sint32::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<i32, i32, prost::encoding::sfixed32::encoded_len, prost::encoding::sfixed32::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<u32, u32, prost::encoding::uint32::encoded_len, prost::encoding::uint32::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<u32, u32, prost::encoding::fixed32::encoded_len, prost::encoding::fixed32::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<i64, i64, prost::encoding::int64::encoded_len, prost::encoding::int64::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<i64, i64, prost::encoding::sint64::encoded_len, prost::encoding::sint64::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<i64, i64, prost::encoding::sfixed64::encoded_len, prost::encoding::sfixed64::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<u64, u64, prost::encoding::uint64::encoded_len, prost::encoding::uint64::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
prost::encoding::btree_map::encoded_len_with_default::<u64, u64, prost::encoding::fixed64::encoded_len, prost::encoding::fixed64::encoded_len>
Line
Count
Source
1364
800k
        pub fn encoded_len_with_default<K, V, KL, VL>(
1365
800k
            key_encoded_len: KL,
1366
800k
            val_encoded_len: VL,
1367
800k
            val_default: &V,
1368
800k
            tag: u32,
1369
800k
            values: &$map_ty<K, V>,
1370
800k
        ) -> usize
1371
800k
        where
1372
800k
            K: Default + Eq + Hash + Ord,
1373
800k
            V: PartialEq,
1374
800k
            KL: Fn(u32, &K) -> usize,
1375
800k
            VL: Fn(u32, &V) -> usize,
1376
        {
1377
800k
            key_len(tag) * values.len()
1378
800k
                + values
1379
800k
                    .iter()
1380
800k
                    .map(|(key, val)| {
1381
                        let len = (if key == &K::default() {
1382
                            0
1383
                        } else {
1384
                            key_encoded_len(1, key)
1385
                        }) + (if val == val_default {
1386
                            0
1387
                        } else {
1388
                            val_encoded_len(2, val)
1389
                        });
1390
                        encoded_len_varint(len as u64) + len
1391
                    })
1392
800k
                    .sum::<usize>()
1393
800k
        }
1394
    };
1395
}
1396
1397
#[cfg(feature = "std")]
1398
pub mod hash_map {
1399
    use std::collections::HashMap;
1400
    map!(HashMap);
1401
}
1402
1403
pub mod btree_map {
1404
    map!(BTreeMap);
1405
}
1406
1407
#[cfg(test)]
1408
mod test {
1409
    use alloc::string::ToString;
1410
    use core::borrow::Borrow;
1411
    use core::fmt::Debug;
1412
    use core::u64;
1413
1414
    use ::bytes::{Bytes, BytesMut};
1415
    use proptest::{prelude::*, test_runner::TestCaseResult};
1416
1417
    use crate::encoding::*;
1418
1419
    pub fn check_type<T, B>(
1420
        value: T,
1421
        tag: u32,
1422
        wire_type: WireType,
1423
        encode: fn(u32, &B, &mut BytesMut),
1424
        merge: fn(WireType, &mut T, &mut Bytes, DecodeContext) -> Result<(), DecodeError>,
1425
        encoded_len: fn(u32, &B) -> usize,
1426
    ) -> TestCaseResult
1427
    where
1428
        T: Debug + Default + PartialEq + Borrow<B>,
1429
        B: ?Sized,
1430
    {
1431
        prop_assume!(MIN_TAG <= tag && tag <= MAX_TAG);
1432
1433
        let expected_len = encoded_len(tag, value.borrow());
1434
1435
        let mut buf = BytesMut::with_capacity(expected_len);
1436
        encode(tag, value.borrow(), &mut buf);
1437
1438
        let mut buf = buf.freeze();
1439
1440
        prop_assert_eq!(
1441
            buf.remaining(),
1442
            expected_len,
1443
            "encoded_len wrong; expected: {}, actual: {}",
1444
            expected_len,
1445
            buf.remaining()
1446
        );
1447
1448
        if !buf.has_remaining() {
1449
            // Short circuit for empty packed values.
1450
            return Ok(());
1451
        }
1452
1453
        let (decoded_tag, decoded_wire_type) =
1454
            decode_key(&mut buf).map_err(|error| TestCaseError::fail(error.to_string()))?;
1455
        prop_assert_eq!(
1456
            tag,
1457
            decoded_tag,
1458
            "decoded tag does not match; expected: {}, actual: {}",
1459
            tag,
1460
            decoded_tag
1461
        );
1462
1463
        prop_assert_eq!(
1464
            wire_type,
1465
            decoded_wire_type,
1466
            "decoded wire type does not match; expected: {:?}, actual: {:?}",
1467
            wire_type,
1468
            decoded_wire_type,
1469
        );
1470
1471
        match wire_type {
1472
            WireType::SixtyFourBit if buf.remaining() != 8 => Err(TestCaseError::fail(format!(
1473
                "64bit wire type illegal remaining: {}, tag: {}",
1474
                buf.remaining(),
1475
                tag
1476
            ))),
1477
            WireType::ThirtyTwoBit if buf.remaining() != 4 => Err(TestCaseError::fail(format!(
1478
                "32bit wire type illegal remaining: {}, tag: {}",
1479
                buf.remaining(),
1480
                tag
1481
            ))),
1482
            _ => Ok(()),
1483
        }?;
1484
1485
        let mut roundtrip_value = T::default();
1486
        merge(
1487
            wire_type,
1488
            &mut roundtrip_value,
1489
            &mut buf,
1490
            DecodeContext::default(),
1491
        )
1492
        .map_err(|error| TestCaseError::fail(error.to_string()))?;
1493
1494
        prop_assert!(
1495
            !buf.has_remaining(),
1496
            "expected buffer to be empty, remaining: {}",
1497
            buf.remaining()
1498
        );
1499
1500
        prop_assert_eq!(value, roundtrip_value);
1501
1502
        Ok(())
1503
    }
1504
1505
    pub fn check_collection_type<T, B, E, M, L>(
1506
        value: T,
1507
        tag: u32,
1508
        wire_type: WireType,
1509
        encode: E,
1510
        mut merge: M,
1511
        encoded_len: L,
1512
    ) -> TestCaseResult
1513
    where
1514
        T: Debug + Default + PartialEq + Borrow<B>,
1515
        B: ?Sized,
1516
        E: FnOnce(u32, &B, &mut BytesMut),
1517
        M: FnMut(WireType, &mut T, &mut Bytes, DecodeContext) -> Result<(), DecodeError>,
1518
        L: FnOnce(u32, &B) -> usize,
1519
    {
1520
        prop_assume!(MIN_TAG <= tag && tag <= MAX_TAG);
1521
1522
        let expected_len = encoded_len(tag, value.borrow());
1523
1524
        let mut buf = BytesMut::with_capacity(expected_len);
1525
        encode(tag, value.borrow(), &mut buf);
1526
1527
        let mut buf = buf.freeze();
1528
1529
        prop_assert_eq!(
1530
            buf.remaining(),
1531
            expected_len,
1532
            "encoded_len wrong; expected: {}, actual: {}",
1533
            expected_len,
1534
            buf.remaining()
1535
        );
1536
1537
        let mut roundtrip_value = Default::default();
1538
        while buf.has_remaining() {
1539
            let (decoded_tag, decoded_wire_type) =
1540
                decode_key(&mut buf).map_err(|error| TestCaseError::fail(error.to_string()))?;
1541
1542
            prop_assert_eq!(
1543
                tag,
1544
                decoded_tag,
1545
                "decoded tag does not match; expected: {}, actual: {}",
1546
                tag,
1547
                decoded_tag
1548
            );
1549
1550
            prop_assert_eq!(
1551
                wire_type,
1552
                decoded_wire_type,
1553
                "decoded wire type does not match; expected: {:?}, actual: {:?}",
1554
                wire_type,
1555
                decoded_wire_type
1556
            );
1557
1558
            merge(
1559
                wire_type,
1560
                &mut roundtrip_value,
1561
                &mut buf,
1562
                DecodeContext::default(),
1563
            )
1564
            .map_err(|error| TestCaseError::fail(error.to_string()))?;
1565
        }
1566
1567
        prop_assert_eq!(value, roundtrip_value);
1568
1569
        Ok(())
1570
    }
1571
1572
    #[test]
1573
    fn string_merge_invalid_utf8() {
1574
        let mut s = String::new();
1575
        let buf = b"\x02\x80\x80";
1576
1577
        let r = string::merge(
1578
            WireType::LengthDelimited,
1579
            &mut s,
1580
            &mut &buf[..],
1581
            DecodeContext::default(),
1582
        );
1583
        r.expect_err("must be an error");
1584
        assert!(s.is_empty());
1585
    }
1586
1587
    #[test]
1588
    fn varint() {
1589
        fn check(value: u64, mut encoded: &[u8]) {
1590
            // TODO(rust-lang/rust-clippy#5494)
1591
            #![allow(clippy::clone_double_ref)]
1592
1593
            // Small buffer.
1594
            let mut buf = Vec::with_capacity(1);
1595
            encode_varint(value, &mut buf);
1596
            assert_eq!(buf, encoded);
1597
1598
            // Large buffer.
1599
            let mut buf = Vec::with_capacity(100);
1600
            encode_varint(value, &mut buf);
1601
            assert_eq!(buf, encoded);
1602
1603
            assert_eq!(encoded_len_varint(value), encoded.len());
1604
1605
            let roundtrip_value = decode_varint(&mut encoded.clone()).expect("decoding failed");
1606
            assert_eq!(value, roundtrip_value);
1607
1608
            let roundtrip_value = decode_varint_slow(&mut encoded).expect("slow decoding failed");
1609
            assert_eq!(value, roundtrip_value);
1610
        }
1611
1612
        check(2u64.pow(0) - 1, &[0x00]);
1613
        check(2u64.pow(0), &[0x01]);
1614
1615
        check(2u64.pow(7) - 1, &[0x7F]);
1616
        check(2u64.pow(7), &[0x80, 0x01]);
1617
        check(300, &[0xAC, 0x02]);
1618
1619
        check(2u64.pow(14) - 1, &[0xFF, 0x7F]);
1620
        check(2u64.pow(14), &[0x80, 0x80, 0x01]);
1621
1622
        check(2u64.pow(21) - 1, &[0xFF, 0xFF, 0x7F]);
1623
        check(2u64.pow(21), &[0x80, 0x80, 0x80, 0x01]);
1624
1625
        check(2u64.pow(28) - 1, &[0xFF, 0xFF, 0xFF, 0x7F]);
1626
        check(2u64.pow(28), &[0x80, 0x80, 0x80, 0x80, 0x01]);
1627
1628
        check(2u64.pow(35) - 1, &[0xFF, 0xFF, 0xFF, 0xFF, 0x7F]);
1629
        check(2u64.pow(35), &[0x80, 0x80, 0x80, 0x80, 0x80, 0x01]);
1630
1631
        check(2u64.pow(42) - 1, &[0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F]);
1632
        check(2u64.pow(42), &[0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01]);
1633
1634
        check(
1635
            2u64.pow(49) - 1,
1636
            &[0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F],
1637
        );
1638
        check(
1639
            2u64.pow(49),
1640
            &[0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01],
1641
        );
1642
1643
        check(
1644
            2u64.pow(56) - 1,
1645
            &[0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F],
1646
        );
1647
        check(
1648
            2u64.pow(56),
1649
            &[0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01],
1650
        );
1651
1652
        check(
1653
            2u64.pow(63) - 1,
1654
            &[0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F],
1655
        );
1656
        check(
1657
            2u64.pow(63),
1658
            &[0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01],
1659
        );
1660
1661
        check(
1662
            u64::MAX,
1663
            &[0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01],
1664
        );
1665
    }
1666
1667
    /// This big bowl o' macro soup generates an encoding property test for each combination of map
1668
    /// type, scalar map key, and value type.
1669
    /// TODO: these tests take a long time to compile, can this be improved?
1670
    #[cfg(feature = "std")]
1671
    macro_rules! map_tests {
1672
        (keys: $keys:tt,
1673
         vals: $vals:tt) => {
1674
            mod hash_map {
1675
                map_tests!(@private HashMap, hash_map, $keys, $vals);
1676
            }
1677
            mod btree_map {
1678
                map_tests!(@private BTreeMap, btree_map, $keys, $vals);
1679
            }
1680
        };
1681
1682
        (@private $map_type:ident,
1683
                  $mod_name:ident,
1684
                  [$(($key_ty:ty, $key_proto:ident)),*],
1685
                  $vals:tt) => {
1686
            $(
1687
                mod $key_proto {
1688
                    use std::collections::$map_type;
1689
1690
                    use proptest::prelude::*;
1691
1692
                    use crate::encoding::*;
1693
                    use crate::encoding::test::check_collection_type;
1694
1695
                    map_tests!(@private $map_type, $mod_name, ($key_ty, $key_proto), $vals);
1696
                }
1697
            )*
1698
        };
1699
1700
        (@private $map_type:ident,
1701
                  $mod_name:ident,
1702
                  ($key_ty:ty, $key_proto:ident),
1703
                  [$(($val_ty:ty, $val_proto:ident)),*]) => {
1704
            $(
1705
                proptest! {
1706
                    #[test]
1707
                    fn $val_proto(values: $map_type<$key_ty, $val_ty>, tag in MIN_TAG..=MAX_TAG) {
1708
                        check_collection_type(values, tag, WireType::LengthDelimited,
1709
                                              |tag, values, buf| {
1710
                                                  $mod_name::encode($key_proto::encode,
1711
                                                                    $key_proto::encoded_len,
1712
                                                                    $val_proto::encode,
1713
                                                                    $val_proto::encoded_len,
1714
                                                                    tag,
1715
                                                                    values,
1716
                                                                    buf)
1717
                                              },
1718
                                              |wire_type, values, buf, ctx| {
1719
                                                  check_wire_type(WireType::LengthDelimited, wire_type)?;
1720
                                                  $mod_name::merge($key_proto::merge,
1721
                                                                   $val_proto::merge,
1722
                                                                   values,
1723
                                                                   buf,
1724
                                                                   ctx)
1725
                                              },
1726
                                              |tag, values| {
1727
                                                  $mod_name::encoded_len($key_proto::encoded_len,
1728
                                                                         $val_proto::encoded_len,
1729
                                                                         tag,
1730
                                                                         values)
1731
                                              })?;
1732
                    }
1733
                }
1734
             )*
1735
        };
1736
    }
1737
1738
    #[cfg(feature = "std")]
1739
    map_tests!(keys: [
1740
        (i32, int32),
1741
        (i64, int64),
1742
        (u32, uint32),
1743
        (u64, uint64),
1744
        (i32, sint32),
1745
        (i64, sint64),
1746
        (u32, fixed32),
1747
        (u64, fixed64),
1748
        (i32, sfixed32),
1749
        (i64, sfixed64),
1750
        (bool, bool),
1751
        (String, string)
1752
    ],
1753
    vals: [
1754
        (f32, float),
1755
        (f64, double),
1756
        (i32, int32),
1757
        (i64, int64),
1758
        (u32, uint32),
1759
        (u64, uint64),
1760
        (i32, sint32),
1761
        (i64, sint64),
1762
        (u32, fixed32),
1763
        (u64, fixed64),
1764
        (i32, sfixed32),
1765
        (i64, sfixed64),
1766
        (bool, bool),
1767
        (String, string),
1768
        (Vec<u8>, bytes)
1769
    ]);
1770
}