devlog/error.rs
1//! Error type returned by the devlog library.
2
3use std::io::Error as IOError;
4
5#[derive(Debug)]
6pub enum Error {
7 /// An invalid argument was passed to the command-line app
8 InvalidArg(&'static str),
9
10 /// The repository contains the maximum number of log file entries,
11 /// so no more can be created.
12 LogFileLimitExceeded,
13
14 /// Wraps `io::Error`
15 IOError(IOError),
16}
17
18impl From<IOError> for Error {
19 fn from(err: IOError) -> Error {
20 Error::IOError(err)
21 }
22}