Struct esp_idf_hal::sys::esp_mqtt_error_codes

source ·
#[repr(C)]
pub struct esp_mqtt_error_codes { pub esp_tls_last_esp_err: i32, pub esp_tls_stack_err: i32, pub esp_tls_cert_verify_flags: i32, pub error_type: u32, pub connect_return_code: u32, pub esp_transport_sock_errno: i32, }
Expand description

@brief MQTT error code structure to be passed as a contextual information into ERROR event

Important: This structure extends esp_tls_last_error error structure and is backward compatible with it (so might be down-casted and treated as esp_tls_last_error error, but recommended to update applications if used this way previously)

Use this structure directly checking error_type first and then appropriate error code depending on the source of the error:

| error_type | related member variables | note | | MQTT_ERROR_TYPE_TCP_TRANSPORT | esp_tls_last_esp_err, esp_tls_stack_err, esp_tls_cert_verify_flags, sock_errno | Error reported from tcp_transport/esp-tls | | MQTT_ERROR_TYPE_CONNECTION_REFUSED | connect_return_code | Internal error reported from MQTT broker on connection |

Fields§

§esp_tls_last_esp_err: i32

< last esp_err code reported from esp-tls component

§esp_tls_stack_err: i32

< tls specific error code reported from underlying tls stack

§esp_tls_cert_verify_flags: i32

< tls flags reported from underlying tls stack during certificate verification

§error_type: u32

< error type referring to the source of the error

§connect_return_code: u32

< connection refused error code reported from MQTT* broker on connection

§esp_transport_sock_errno: i32

< errno from the underlying socket

Trait Implementations§

source§

impl Clone for esp_mqtt_error_codes

source§

fn clone(&self) -> esp_mqtt_error_codes

Returns a copy of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
source§

impl Debug for esp_mqtt_error_codes

source§

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

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

impl Default for esp_mqtt_error_codes

source§

fn default() -> esp_mqtt_error_codes

Returns the “default value” for a type. Read more
source§

impl Copy for esp_mqtt_error_codes

Auto Trait Implementations§

§

impl Freeze for esp_mqtt_error_codes

§

impl RefUnwindSafe for esp_mqtt_error_codes

§

impl Send for esp_mqtt_error_codes

§

impl Sync for esp_mqtt_error_codes

§

impl Unpin for esp_mqtt_error_codes

§

impl UnwindSafe for esp_mqtt_error_codes

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> CloneToUninit for T
where T: Copy,

§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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.
§

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

Performs the conversion.