pub struct NftnlError { /* private fields */ }Expand description
A storage for error and description.
Implementations§
Source§impl NftnlError
impl NftnlError
Sourcepub fn new_internal_error(erno: i32, error_descr: String) -> Self
pub fn new_internal_error(erno: i32, error_descr: String) -> Self
Creates new error from errno and user provided message.
Sourcepub fn new_ntfl_code(err: &Nlmsgerr, msg: String) -> Self
pub fn new_ntfl_code(err: &Nlmsgerr, msg: String) -> Self
Creates error from [Nlmsgerr] and user provided message.
Sourcepub fn get_msg(&self) -> &str
pub fn get_msg(&self) -> &str
Returns the error message (error description privided in the program.)
Sourcepub fn is_error_exists(&self) -> bool
pub fn is_error_exists(&self) -> bool
Test is error is libc::EEXIST
Sourcepub fn is_error_does_not_exist(&self) -> bool
pub fn is_error_does_not_exist(&self) -> bool
Test is error is libc::ENOENT
Trait Implementations§
Source§impl Debug for NftnlError
impl Debug for NftnlError
Auto Trait Implementations§
impl Freeze for NftnlError
impl RefUnwindSafe for NftnlError
impl Send for NftnlError
impl Sync for NftnlError
impl Unpin for NftnlError
impl UnwindSafe for NftnlError
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