Struct common_messages_sv2::SetupConnectionError [−][src]
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’
Trait Implementations
fn from_bytes(data: &'a mut [u8]) -> Result<Self, Error>
fn from_reader(reader: &mut impl Read) -> Result<Self, Error>
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl<'decoder> RefUnwindSafe for SetupConnectionError<'decoder>
impl<'decoder> Send for SetupConnectionError<'decoder>
impl<'decoder> Sync for SetupConnectionError<'decoder>
impl<'decoder> Unpin for SetupConnectionError<'decoder>
impl<'decoder> !UnwindSafe for SetupConnectionError<'decoder>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<'a, T> Encodable for T where
T: Into<EncodableField<'a>>,
impl<'a, T> Encodable for T where
T: Into<EncodableField<'a>>,