kona_common/errors.rs
1//! Errors for the `kona-common` crate.
2
3use thiserror::Error;
4
5/// An error that can occur when reading from or writing to a file descriptor.
6#[derive(Error, Debug, PartialEq, Eq)]
7#[error("IO error (errno: {_0})")]
8pub struct IOError(pub i32);
9
10/// A [Result] type for the [IOError].
11pub type IOResult<T> = Result<T, IOError>;