Struct esp_idf_sys::wifi_prov_scheme

source ·
#[repr(C)]
pub struct wifi_prov_scheme { pub prov_start: Option<unsafe extern "C" fn(pc: *mut protocomm_t, config: *mut c_void) -> esp_err_t>, pub prov_stop: Option<unsafe extern "C" fn(pc: *mut protocomm_t) -> esp_err_t>, pub new_config: Option<unsafe extern "C" fn() -> *mut c_void>, pub delete_config: Option<unsafe extern "C" fn(config: *mut c_void)>, pub set_config_service: Option<unsafe extern "C" fn(config: *mut c_void, service_name: *const c_char, service_key: *const c_char) -> esp_err_t>, pub set_config_endpoint: Option<unsafe extern "C" fn(config: *mut c_void, endpoint_name: *const c_char, uuid: u16) -> esp_err_t>, pub wifi_mode: wifi_mode_t, }
Expand description

@brief Structure for specifying the provisioning scheme to be followed by the manager

@note Ready to use schemes are available: - wifi_prov_scheme_ble : for provisioning over BLE transport + GATT server - wifi_prov_scheme_softap : for provisioning over SoftAP transport + HTTP server - wifi_prov_scheme_console : for provisioning over Serial UART transport + Console (for debugging)

Fields§

§prov_start: Option<unsafe extern "C" fn(pc: *mut protocomm_t, config: *mut c_void) -> esp_err_t>

Function which is to be called by the manager when it is to start the provisioning service associated with a protocomm instance and a scheme specific configuration

§prov_stop: Option<unsafe extern "C" fn(pc: *mut protocomm_t) -> esp_err_t>

Function which is to be called by the manager to stop the provisioning service previously associated with a protocomm instance

§new_config: Option<unsafe extern "C" fn() -> *mut c_void>

Function which is to be called by the manager to generate a new configuration for the provisioning service, that is to be passed to prov_start()

§delete_config: Option<unsafe extern "C" fn(config: *mut c_void)>

Function which is to be called by the manager to delete a configuration generated using new_config()

§set_config_service: Option<unsafe extern "C" fn(config: *mut c_void, service_name: *const c_char, service_key: *const c_char) -> esp_err_t>

Function which is to be called by the manager to set the service name and key values in the configuration structure

§set_config_endpoint: Option<unsafe extern "C" fn(config: *mut c_void, endpoint_name: *const c_char, uuid: u16) -> esp_err_t>

Function which is to be called by the manager to set a protocomm endpoint with an identifying name and UUID in the configuration structure

§wifi_mode: wifi_mode_t

Sets mode of operation of Wi-Fi during provisioning This is set to :

  • WIFI_MODE_APSTA for SoftAP transport
  • WIFI_MODE_STA for BLE transport

Trait Implementations§

source§

impl Clone for wifi_prov_scheme

source§

fn clone(&self) -> wifi_prov_scheme

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 wifi_prov_scheme

source§

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

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

impl Default for wifi_prov_scheme

source§

fn default() -> Self

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

impl Copy for wifi_prov_scheme

Auto Trait Implementations§

§

impl Freeze for wifi_prov_scheme

§

impl RefUnwindSafe for wifi_prov_scheme

§

impl Send for wifi_prov_scheme

§

impl Sync for wifi_prov_scheme

§

impl Unpin for wifi_prov_scheme

§

impl UnwindSafe for wifi_prov_scheme

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