pub enum PeerEndpointError {
Empty,
SchemeBearing {
endpoint: String,
},
MissingPort {
endpoint: String,
},
EmptyHost {
endpoint: String,
},
InvalidPort {
endpoint: String,
reason: &'static str,
},
}Expand description
Error returned when a string fails the PeerEndpoint contract.
Variants§
Empty
The endpoint was an empty string. PeerEndpoint carries no “absent”
semantics; callers that need optionality wrap it in Option.
SchemeBearing
The endpoint begins with http:// or https://. The TLS client
silently drops scheme-bearing leader hints to refuse a transport
downgrade, so a scheme-bearing endpoint makes its owner unreachable
via redirect.
MissingPort
The endpoint has no :port suffix. A bare host is technically a valid
authority but is never an intentional production value — the consensus
drivers always advertise an explicit port.
EmptyHost
The host portion before :port is empty (e.g. ":50051").
InvalidPort
The port portion is empty, non-numeric, or outside 1..=65535.
Trait Implementations§
Source§impl Clone for PeerEndpointError
impl Clone for PeerEndpointError
Source§fn clone(&self) -> PeerEndpointError
fn clone(&self) -> PeerEndpointError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PeerEndpointError
impl Debug for PeerEndpointError
Source§impl Display for PeerEndpointError
impl Display for PeerEndpointError
impl Eq for PeerEndpointError
Source§impl Error for PeerEndpointError
impl Error for PeerEndpointError
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 PeerEndpointError
impl PartialEq for PeerEndpointError
Source§fn eq(&self, other: &PeerEndpointError) -> bool
fn eq(&self, other: &PeerEndpointError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PeerEndpointError
Auto Trait Implementations§
impl Freeze for PeerEndpointError
impl RefUnwindSafe for PeerEndpointError
impl Send for PeerEndpointError
impl Sync for PeerEndpointError
impl Unpin for PeerEndpointError
impl UnsafeUnpin for PeerEndpointError
impl UnwindSafe for PeerEndpointError
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