1use core::fmt;
4
5#[derive(Copy, Clone, Debug)]
12pub struct StreamCipherError;
13
14impl fmt::Display for StreamCipherError {
15 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
16 f.write_str("Loop Error")
17 }
18}
19
20impl core::error::Error for StreamCipherError {}
21
22#[derive(Copy, Clone, Debug)]
25pub struct OverflowError;
26
27impl fmt::Display for OverflowError {
28 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
29 f.write_str("Overflow Error")
30 }
31}
32
33impl From<OverflowError> for StreamCipherError {
34 fn from(_: OverflowError) -> StreamCipherError {
35 StreamCipherError
36 }
37}
38
39impl core::error::Error for OverflowError {}