channels-packet 0.2.0

Utilities to parse channels packets.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
/// Signal to the calling code that parsing cannot continue until this many more bytes have
/// been read.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Wants(pub(crate) usize);

impl Wants {
	/// Get the number of bytes required before parsing can make progress.
	#[inline]
	#[must_use]
	pub fn get(&self) -> usize {
		self.0
	}
}