channels_packet/
wants.rs

1/// Signal to the calling code that parsing cannot continue until this many more bytes have
2/// been read.
3#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
4pub struct Wants(pub(crate) usize);
5
6impl Wants {
7	/// Get the number of bytes required before parsing can make progress.
8	#[inline]
9	#[must_use]
10	pub fn get(&self) -> usize {
11		self.0
12	}
13}