#[non_exhaustive]pub enum Refused {
ProtocolTooOld,
PeerRejected,
Retiring,
}Expand description
Why a server refused a connection during negotiation. A client handshake
returns it inside an io::ErrorKind::ConnectionRefused error; read it
with Refused::of. A server that closes without a reason, an older
server included, still produces an ordinary I/O error.
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.
ProtocolTooOld
The client lacks a binary version or capability the server requires. The same client build cannot succeed against this server.
PeerRejected
The server’s peer policy rejected this client.
Retiring
The server is retiring. Read discovery again to find its successor.
Implementations§
Trait Implementations§
impl Copy for Refused
impl Eq for Refused
Source§impl Error for Refused
impl Error for Refused
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()
impl StructuralPartialEq for Refused
Auto Trait Implementations§
impl Freeze for Refused
impl RefUnwindSafe for Refused
impl Send for Refused
impl Sync for Refused
impl Unpin for Refused
impl UnsafeUnpin for Refused
impl UnwindSafe for Refused
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