19 lines
595 B
Rust
19 lines
595 B
Rust
//! Errors while parsing streams
|
|
|
|
/// Crypto errors
|
|
#[derive(::thiserror::Error, Debug, Copy, Clone)]
|
|
pub enum Error {
|
|
/// Error while parsing key material
|
|
#[error("Not enough data for stream chunk: {0}")]
|
|
NotEnoughData(usize),
|
|
/// Sequence outside of the window
|
|
#[error("Sequence out of the sliding window")]
|
|
OutOfWindow,
|
|
/// Wrong start/end flags received, can't reconstruct data
|
|
#[error("Wrong start/end flags received")]
|
|
WrongFlags,
|
|
/// Can't reconstruct the data
|
|
#[error("Error in reconstructing the bytestream/datagrams")]
|
|
Reconstructing,
|
|
}
|