chksum_core/
error.rs

1use std::{io, result};
2
3/// The error type for checksum-based operations.
4#[derive(Debug, thiserror::Error)]
5pub enum Error {
6    /// The input is an interactive terminal.
7    #[error("cannot process terminal input")]
8    IsTerminal,
9    /// The I/O error occured.
10    #[error(transparent)]
11    Io(#[from] io::Error),
12}
13
14/// A specialized [`Result`](std::result::Result) type for checksum-based operations.
15///
16/// This typedef is generally used to avoid writing out [Error] directly and is otherwise a direct mapping to [Result].
17pub type Result<T> = result::Result<T, Error>;