#[non_exhaustive]pub enum ConnectError {
ConnectTimeout,
PermissionDenied,
EndpointTooLong,
Failed(ErrorKind),
}Expand description
Connection establishment failure, before application traffic is sent.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ConnectTimeout
Nothing accepted the connection in time: the endpoint does not exist yet, refused the connection, is busy, or the deadline passed.
PermissionDenied
The OS denied access to the endpoint.
EndpointTooLong
The endpoint path does not fit in a Unix socket address, so no attempt
can succeed. See crate::socket_path.
Failed(ErrorKind)
The OS failed the attempt for another reason, which waiting does not fix.
Implementations§
Source§impl ConnectError
impl ConnectError
Sourcepub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
Whether a later attempt can succeed: nothing accepted the connection in
time, which includes an endpoint that does not exist yet. Every failure
is_transient lists becomes Self::ConnectTimeout.
Trait Implementations§
Source§impl Clone for ConnectError
impl Clone for ConnectError
impl Copy for ConnectError
Source§impl Debug for ConnectError
impl Debug for ConnectError
Source§impl Display for ConnectError
impl Display for ConnectError
impl Eq for ConnectError
Source§impl Error for ConnectError
impl Error for ConnectError
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 PartialEq for ConnectError
impl PartialEq for ConnectError
impl StructuralPartialEq for ConnectError
Auto Trait Implementations§
impl Freeze for ConnectError
impl RefUnwindSafe for ConnectError
impl Send for ConnectError
impl Sync for ConnectError
impl Unpin for ConnectError
impl UnsafeUnpin for ConnectError
impl UnwindSafe for ConnectError
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