1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#[cfg(not(feature = "async"))]
mod default;

#[cfg(not(feature = "async"))]
pub use crate::default::{encode, Decoder, Encoder, Error, Result};

#[cfg(feature = "async")]
mod tokio;

#[cfg(feature = "async")]
pub use crate::tokio::{SlipCodecError, SlipDecoder, SlipEncoder};

const END: u8 = 0xC0;
const ESC: u8 = 0xDB;
const ESC_END: u8 = 0xDC;
const ESC_ESC: u8 = 0xDD;