use std::string::FromUtf8Error;
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("Failed to execute `{0}`. Received error code `{1}`")]
GetIfAddrsError(String, i32),
#[error("Failed to parse bytes into UTF-8 characters. `{0}`")]
ParseUtf8Error(FromUtf8Error),
}
impl From<FromUtf8Error> for Error {
fn from(error: FromUtf8Error) -> Self {
Error::ParseUtf8Error(error)
}
}
pub type Result<T> = std::result::Result<T, Error>;