pub enum NetIfError {
InvalidName,
NameTooLong,
NotFound {
name: String,
source: Error,
},
}Expand description
错误类型
Variants§
InvalidName
网卡名包含内部 NUL 字节
NameTooLong
网卡名过长(超过 IFNAMSIZ-1)
NotFound
if_nametoindex 系统调用失败(网卡不存在或权限不足)
Trait Implementations§
Source§impl Debug for NetIfError
impl Debug for NetIfError
Source§impl Display for NetIfError
impl Display for NetIfError
Source§impl Error for NetIfError
impl Error for NetIfError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for NetIfError
impl !UnwindSafe for NetIfError
impl Freeze for NetIfError
impl Send for NetIfError
impl Sync for NetIfError
impl Unpin for NetIfError
impl UnsafeUnpin for NetIfError
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