Skip to main content

BleAdvFields

Struct BleAdvFields 

Source
pub struct BleAdvFields<'a> {
    pub flags: u8,
    pub name: Option<&'a str>,
    pub tx_power_level: Option<i8>,
    pub appearance: Option<u16>,
    pub service_data_uuid16: Option<&'a [u8]>,
    pub manufacturer_data: Option<&'a [u8]>,
}
Expand description

Structured advertising payload (safe version of ble_hs_adv_fields).

Which raw-payload setter the driver offers depends on whether the build has extended advertising enabled; in this build it is BleDriver::adv_set_data, which you can use to set the payload bytes yourself.

Fields§

§flags: u8§name: Option<&'a str>§tx_power_level: Option<i8>§appearance: Option<u16>§service_data_uuid16: Option<&'a [u8]>§manufacturer_data: Option<&'a [u8]>

Trait Implementations§

Source§

impl<'a> Clone for BleAdvFields<'a>

Source§

fn clone(&self) -> BleAdvFields<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§

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

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for BleAdvFields<'a>

Source§

impl<'a> Default for BleAdvFields<'a>

Source§

fn default() -> BleAdvFields<'a>

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

impl From<&BleAdvFields<'_>> for ble_hs_adv_fields

Source§

fn from(fields: &BleAdvFields<'_>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for BleAdvFields<'a>

§

impl<'a> RefUnwindSafe for BleAdvFields<'a>

§

impl<'a> Send for BleAdvFields<'a>

§

impl<'a> Sync for BleAdvFields<'a>

§

impl<'a> Unpin for BleAdvFields<'a>

§

impl<'a> UnsafeUnpin for BleAdvFields<'a>

§

impl<'a> UnwindSafe for BleAdvFields<'a>

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,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.