Struct esp_idf_sys::esp_mqtt_error_codes
source · [−]#[repr(C)]pub struct esp_mqtt_error_codes {
pub esp_tls_last_esp_err: esp_err_t,
pub esp_tls_stack_err: c_int,
pub esp_tls_cert_verify_flags: c_int,
pub error_type: esp_mqtt_error_type_t,
pub connect_return_code: esp_mqtt_connect_return_code_t,
pub esp_transport_sock_errno: c_int,
}
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: esp_err_t
< last esp_err code reported from esp-tls component
esp_tls_stack_err: c_int
< tls specific error code reported from underlying tls stack
esp_tls_cert_verify_flags: c_int
< tls flags reported from underlying tls stack during certificate verification
error_type: esp_mqtt_error_type_t
< error type referring to the source of the error
connect_return_code: esp_mqtt_connect_return_code_t
< connection refused error code reported from MQTT broker on connection
esp_transport_sock_errno: c_int
< errno from the underlying socket
Trait Implementations
sourceimpl Clone for esp_mqtt_error_codes
impl Clone for esp_mqtt_error_codes
sourcefn clone(&self) -> esp_mqtt_error_codes
fn clone(&self) -> esp_mqtt_error_codes
Returns a copy of the value. Read more
1.0.0fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for esp_mqtt_error_codes
impl Debug for esp_mqtt_error_codes
sourceimpl Default for esp_mqtt_error_codes
impl Default for esp_mqtt_error_codes
impl Copy for esp_mqtt_error_codes
Auto Trait Implementations
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> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more