sheave_core/handlers/
stream_got_exhausted.rs1use std::{
2 error::Error,
3 fmt::{
4 Display,
5 Formatter,
6 Result as FormatResult
7 },
8 io::{
9 Error as IOError,
10 ErrorKind
11 }
12};
13
14#[derive(Debug)]
18pub struct StreamGotExhausted;
19
20impl Display for StreamGotExhausted {
21 fn fmt(&self, f: &mut Formatter<'_>) -> FormatResult {
22 writeln!(f, "Stream got exhausted.")
23 }
24}
25
26impl Error for StreamGotExhausted {}
27
28pub fn stream_got_exhausted() -> IOError {
30 IOError::new(
31 ErrorKind::Other,
32 StreamGotExhausted
33 )
34}
35