pub struct ErrorCode { /* private fields */ }
Expand description
Describes error code of particular category.
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const fn new(code: i32, category: &'static Category) -> ErrorCode
pub const fn new(code: i32, category: &'static Category) -> ErrorCode
Initializes error code with provided category
Sourcepub fn new_system(code: i32) -> ErrorCode
pub fn new_system(code: i32) -> ErrorCode
Creates new System error code.
Sourcepub fn last_posix() -> ErrorCode
pub fn last_posix() -> ErrorCode
Gets last POSIX error
Sourcepub fn last_system() -> ErrorCode
pub fn last_system() -> ErrorCode
Gets last System error
Sourcepub fn is_would_block(&self) -> bool
pub fn is_would_block(&self) -> bool
Returns true
if underlying error indicates operation can or should be re-tried at later date.
Trait Implementations§
Source§impl NngError for ErrorCode
impl NngError for ErrorCode
Source§fn is_cancelled(&self) -> bool
fn is_cancelled(&self) -> bool
Returns whether error code indicates cancellation of future.
Source§fn is_timed_out(&self) -> bool
fn is_timed_out(&self) -> bool
Returns whether error code indicates operation timed out.
Source§fn is_conn_aborted(&self) -> bool
fn is_conn_aborted(&self) -> bool
Returns whether error code indicates aborted connection.
Source§fn is_conn_reset(&self) -> bool
fn is_conn_reset(&self) -> bool
Returns whether error code indicates connection has been reset.
Source§fn is_conn_refused(&self) -> bool
fn is_conn_refused(&self) -> bool
Returns whether error code indicates connection has been refused.
Source§fn is_peer_auth(&self) -> bool
fn is_peer_auth(&self) -> bool
Returns whether error code indicates problem with peer’s authentication
impl Copy for ErrorCode
impl Eq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
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