pub enum NetworkInterfacesError {
Io(Error),
Parser(ParserError),
FamilyParse(FamilyParseError),
MethodParse(MethodParseError),
FileModified,
Other(String),
}
Expand description
The main error type for the NetworkInterfaces
library.
This enum encapsulates all possible errors that can occur within the library.
Variants§
Io(Error)
An I/O error occurred.
Parser(ParserError)
An error occurred while parsing the interfaces file.
FamilyParse(FamilyParseError)
An error occurred while parsing the Family
enum.
MethodParse(MethodParseError)
An error occurred while parsing the Method
enum.
FileModified
The interfaces file has been modified on disk since it was last loaded.
Other(String)
A catch-all for other errors.
Trait Implementations§
Source§impl Debug for NetworkInterfacesError
impl Debug for NetworkInterfacesError
Source§impl Display for NetworkInterfacesError
impl Display for NetworkInterfacesError
Source§impl Error for NetworkInterfacesError
impl Error for NetworkInterfacesError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for NetworkInterfacesError
impl From<Error> for NetworkInterfacesError
Source§impl From<FamilyParseError> for NetworkInterfacesError
impl From<FamilyParseError> for NetworkInterfacesError
Source§fn from(err: FamilyParseError) -> Self
fn from(err: FamilyParseError) -> Self
Converts to this type from the input type.
Source§impl From<MethodParseError> for NetworkInterfacesError
impl From<MethodParseError> for NetworkInterfacesError
Source§fn from(err: MethodParseError) -> Self
fn from(err: MethodParseError) -> Self
Converts to this type from the input type.
Source§impl From<ParserError> for NetworkInterfacesError
impl From<ParserError> for NetworkInterfacesError
Source§fn from(err: ParserError) -> Self
fn from(err: ParserError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NetworkInterfacesError
impl !RefUnwindSafe for NetworkInterfacesError
impl Send for NetworkInterfacesError
impl Sync for NetworkInterfacesError
impl Unpin for NetworkInterfacesError
impl !UnwindSafe for NetworkInterfacesError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more