Skip to main content

GattServices

Struct GattServices 

Source
pub struct GattServices<const N: usize>(/* private fields */);
Expand description

A static (compile-time) GATT service table: a null-terminated ble_gatt_svc_def array wrapped so it can live in a static. Build one with the gatt_services! macro and pass &MY_SERVICES to new_with_services — it needs no heap and lands in flash. N (services + terminator) is inferred by the macro; you never write it.

Trait Implementations§

Source§

impl<const N: usize> AsRef<[ble_gatt_svc_def]> for GattServices<N>

Source§

fn as_ref(&self) -> &[ble_gatt_svc_def]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<const N: usize> Sync for GattServices<N>

Auto Trait Implementations§

§

impl<const N: usize> !Send for GattServices<N>

§

impl<const N: usize> Freeze for GattServices<N>
where [ble_gatt_svc_def; N]: Freeze,

§

impl<const N: usize> RefUnwindSafe for GattServices<N>
where [ble_gatt_svc_def; N]: RefUnwindSafe,

§

impl<const N: usize> Unpin for GattServices<N>
where [ble_gatt_svc_def; N]: Unpin,

§

impl<const N: usize> UnsafeUnpin for GattServices<N>
where [ble_gatt_svc_def; N]: UnsafeUnpin,

§

impl<const N: usize> UnwindSafe for GattServices<N>
where [ble_gatt_svc_def; N]: UnwindSafe,

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