pub enum LinuxError {
Xsk(XskError),
Umem(UmemError),
Ring(RingError),
Descriptor(DescriptorError),
Syscall {
syscall: &'static str,
errno: i32,
},
InsufficientResources(String),
Unsupported(String),
}Expand description
Linux 平台操作错误
Variants§
Xsk(XskError)
AF_XDP 操作错误
Umem(UmemError)
UMEM 操作错误
Ring(RingError)
Ring 操作错误
Descriptor(DescriptorError)
描述符校验错误
Syscall
系统调用错误
InsufficientResources(String)
资源不足
Unsupported(String)
不支持的操作
Implementations§
Source§impl LinuxError
impl LinuxError
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
获取错误严重级别
Sourcepub fn is_syscall_error(&self) -> bool
pub fn is_syscall_error(&self) -> bool
是否为系统调用错误
Sourcepub fn is_config_error(&self) -> bool
pub fn is_config_error(&self) -> bool
是否为配置错误
Sourcepub fn is_resource_error(&self) -> bool
pub fn is_resource_error(&self) -> bool
是否为资源错误
Trait Implementations§
Source§impl Debug for LinuxError
impl Debug for LinuxError
Source§impl Display for LinuxError
impl Display for LinuxError
Source§impl Error for LinuxError
impl Error for LinuxError
1.30.0 · 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<DescriptorError> for LinuxError
impl From<DescriptorError> for LinuxError
Source§fn from(e: DescriptorError) -> Self
fn from(e: DescriptorError) -> Self
Converts to this type from the input type.
Source§impl From<LinuxError> for Error
impl From<LinuxError> for Error
Source§fn from(err: LinuxError) -> Self
fn from(err: LinuxError) -> Self
Converts to this type from the input type.
Source§impl From<RingError> for LinuxError
impl From<RingError> for LinuxError
Source§impl From<UmemError> for LinuxError
impl From<UmemError> for LinuxError
Auto Trait Implementations§
impl Freeze for LinuxError
impl RefUnwindSafe for LinuxError
impl Send for LinuxError
impl Sync for LinuxError
impl Unpin for LinuxError
impl UnsafeUnpin for LinuxError
impl UnwindSafe for LinuxError
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