iptr_perf_pt_reader/error.rs
1use thiserror::Error;
2
3/// Perf.data reader error
4#[derive(Error, Debug)]
5#[non_exhaustive]
6pub enum ReaderError {
7 /// The `perf.data` file is invalid in format
8 #[error("Invalid perf.data")]
9 InvalidPerfData,
10 /// Unexpected EOF
11 #[error("Unexpected EOF")]
12 UnexpectedEOF,
13}
14
15pub(crate) type ReaderResult<T> = core::result::Result<T, ReaderError>;