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>

source

pub fn into_static(self) -> SetupConnectionError<'static>

source§

impl<'decoder> SetupConnectionError<'decoder>

source

pub fn as_static(&self) -> SetupConnectionError<'static>

Trait Implementations§

source§

impl<'decoder> Clone for SetupConnectionError<'decoder>

source§

fn clone(&self) -> SetupConnectionError<'decoder>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'decoder> Debug for SetupConnectionError<'decoder>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'decoder> Decodable<'decoder> for SetupConnectionError<'decoder>

source§

fn get_structure(data: &[u8]) -> Result<Vec<FieldMarker>, Error>

source§

fn from_decoded_fields( data: Vec<DecodableField<'decoder>> ) -> Result<Self, Error>

source§

fn from_bytes(data: &'a mut [u8]) -> Result<Self, Error>

source§

impl<'a> From<SetupConnectionError<'a>> for CSetupConnectionError

source§

fn from(v: SetupConnectionError<'a>) -> Self

Converts to this type from the input type.
source§

impl<'decoder> From<SetupConnectionError<'decoder>> for EncodableField<'decoder>

source§

fn from(v: SetupConnectionError<'decoder>) -> Self

Converts to this type from the input type.
source§

impl<'decoder> GetSize for SetupConnectionError<'decoder>

source§

fn get_size(&self) -> usize

source§

impl<'decoder> PartialEq for SetupConnectionError<'decoder>

source§

fn eq(&self, other: &SetupConnectionError<'decoder>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'decoder> Eq for SetupConnectionError<'decoder>

source§

impl<'decoder> StructuralPartialEq for SetupConnectionError<'decoder>

Auto Trait Implementations§

§

impl<'decoder> Freeze for SetupConnectionError<'decoder>

§

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§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<'a, T> Encodable for T
where T: Into<EncodableField<'a>>,

source§

fn to_bytes(self, dst: &mut [u8]) -> Result<usize, Error>

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.