protobuf 3.7.2

Rust implementation of Google protocol buffers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[cfg(feature = "bytes")]
use bytes::Bytes;

use crate::coded_input_stream::buf_read_or_reader::BufReadOrReader;

/// Hold all possible combinations of input source
#[derive(Debug)]
pub(crate) enum InputSource<'a> {
    Read(BufReadOrReader<'a>),
    #[allow(dead_code)] // Keep the field to clarify we logically hold the reference.
    Slice(&'a [u8]),
    #[cfg(feature = "bytes")]
    Bytes(&'a Bytes),
}