Struct esp_idf_svc::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
impl Clone for esp_mqtt_error_codes
source§fn clone(&self) -> esp_mqtt_error_codes
fn clone(&self) -> esp_mqtt_error_codes
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for esp_mqtt_error_codes
impl Debug for esp_mqtt_error_codes
source§impl Default for esp_mqtt_error_codes
impl Default for esp_mqtt_error_codes
source§fn default() -> esp_mqtt_error_codes
fn default() -> esp_mqtt_error_codes
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 Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)