1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#![deny(unsafe_code, rust_2018_idioms, missing_docs)]
const U16_HEX_BYTES: usize = 4;
const MAX_DATA_LEN: usize = 65516;
const MAX_LINE_LEN: usize = MAX_DATA_LEN + U16_HEX_BYTES;
const FLUSH_LINE: &[u8] = b"0000";
const DELIMITER_LINE: &[u8] = b"0001";
const RESPONSE_END_LINE: &[u8] = b"0002";
const ERR_PREFIX: &[u8] = b"ERR ";
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
pub enum Channel {
Data = 1,
Progress = 2,
Error = 3,
}
pub mod immutable;
pub use immutable::PacketLine;
pub mod read;
#[doc(inline)]
pub use read::StreamingPeekableIter;
#[cfg(any(feature = "async-io", feature = "blocking-io"))]
pub mod write;
#[cfg(any(feature = "async-io", feature = "blocking-io"))]
#[doc(inline)]
pub use write::Writer;
pub mod decode;
#[doc(inline)]
pub use decode::all_at_once as decode;
pub mod encode;
#[cfg(all(feature = "async-io", feature = "blocking-io"))]
compile_error!("Cannot set both 'blocking-io' and 'async-io' features as they are mutually exclusive");