pub enum SocketErrorKind {
BindFailed {
port: u16,
},
BindFailedAfterRetries {
port: u16,
attempts: u8,
},
Custom(&'static str),
}Expand description
Represents why a socket operation failed.
Using an enum instead of String allows for zero-allocation error construction and programmatic error inspection.
Variants§
BindFailed
Failed to bind socket to the specified port.
BindFailedAfterRetries
Failed to bind after multiple retry attempts.
Custom(&'static str)
Custom error (fallback for API compatibility).
Trait Implementations§
Source§impl Clone for SocketErrorKind
impl Clone for SocketErrorKind
Source§fn clone(&self) -> SocketErrorKind
fn clone(&self) -> SocketErrorKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SocketErrorKind
impl Debug for SocketErrorKind
Source§impl Display for SocketErrorKind
impl Display for SocketErrorKind
Source§impl From<SocketErrorKind> for FortressError
impl From<SocketErrorKind> for FortressError
Source§fn from(kind: SocketErrorKind) -> Self
fn from(kind: SocketErrorKind) -> Self
Converts to this type from the input type.
Source§impl Hash for SocketErrorKind
impl Hash for SocketErrorKind
Source§impl PartialEq for SocketErrorKind
impl PartialEq for SocketErrorKind
impl Copy for SocketErrorKind
impl Eq for SocketErrorKind
impl StructuralPartialEq for SocketErrorKind
Auto Trait Implementations§
impl Freeze for SocketErrorKind
impl RefUnwindSafe for SocketErrorKind
impl Send for SocketErrorKind
impl Sync for SocketErrorKind
impl Unpin for SocketErrorKind
impl UnwindSafe for SocketErrorKind
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