libFenrir/src/connection/stream/errors.rs
Luca Fulchir 62a71a2af5
[transport] uud/uudl, first tests
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2025-03-21 17:57:08 +01:00

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,
}