pub struct SetupConnectionError<'decoder> {
pub flags: u32,
pub error_code: Str0255<'decoder>,
}
Expand description
§SetupConnection.Error (Server -> Client)
When protocol version negotiation fails (or there is another reason why the upstream node
cannot setup the connection) the server sends this message with a particular error code prior
to closing the connection.
In order to allow a client to determine the set of available features for a given server (e.g. for
proxies which dynamically switch between different pools and need to be aware of supported
options), clients SHOULD send a SetupConnection message with all flags set and examine the
(potentially) resulting SetupConnectionError
message’s flags field. The Server MUST provide
the full set of flags which it does not support in each SetupConnectionError
message and
MUST consistently support the same set of flags across all servers on the same hostname and
port number. If flags is 0, the error is a result of some condition aside from unsupported flags.
Fields§
§flags: u32
Flags indicating features causing an error.
error_code: Str0255<'decoder>
Human-readable error code(s). See Error Codes section, [link].
§Possible error codes:
- ‘unsupported-feature-flags’
- ‘unsupported-protocol’
- ‘protocol-version-mismatch’
Implementations§
source§impl<'decoder> SetupConnectionError<'decoder>
impl<'decoder> SetupConnectionError<'decoder>
pub fn into_static(self) -> SetupConnectionError<'static>
source§impl<'decoder> SetupConnectionError<'decoder>
impl<'decoder> SetupConnectionError<'decoder>
pub fn as_static(&self) -> SetupConnectionError<'static>
Trait Implementations§
source§impl<'decoder> Clone for SetupConnectionError<'decoder>
impl<'decoder> Clone for SetupConnectionError<'decoder>
source§fn clone(&self) -> SetupConnectionError<'decoder>
fn clone(&self) -> SetupConnectionError<'decoder>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'decoder> Debug for SetupConnectionError<'decoder>
impl<'decoder> Debug for SetupConnectionError<'decoder>
source§impl<'decoder> Decodable<'decoder> for SetupConnectionError<'decoder>
impl<'decoder> Decodable<'decoder> for SetupConnectionError<'decoder>
fn get_structure(data: &[u8]) -> Result<Vec<FieldMarker>, Error>
fn from_decoded_fields( data: Vec<DecodableField<'decoder>> ) -> Result<Self, Error>
fn from_bytes(data: &'a mut [u8]) -> Result<Self, Error>
source§impl<'a> From<SetupConnectionError<'a>> for CSetupConnectionError
impl<'a> From<SetupConnectionError<'a>> for CSetupConnectionError
source§fn from(v: SetupConnectionError<'a>) -> Self
fn from(v: SetupConnectionError<'a>) -> Self
source§impl<'decoder> From<SetupConnectionError<'decoder>> for EncodableField<'decoder>
impl<'decoder> From<SetupConnectionError<'decoder>> for EncodableField<'decoder>
source§fn from(v: SetupConnectionError<'decoder>) -> Self
fn from(v: SetupConnectionError<'decoder>) -> Self
source§impl<'decoder> PartialEq for SetupConnectionError<'decoder>
impl<'decoder> PartialEq for SetupConnectionError<'decoder>
source§fn eq(&self, other: &SetupConnectionError<'decoder>) -> bool
fn eq(&self, other: &SetupConnectionError<'decoder>) -> bool
self
and other
values to be equal, and is used
by ==
.