#[repr(C)]pub struct Uuid16 {
u: ble_uuid_t,
value: [u8; 2],
}
riot_module_nimble_host
only.Expand description
A wrapper around ble_uuid{16,32,128}_t.
The bit length is stored in this type (as opposed to only being known through the type), as that allows getting a full ble_uuid_any_t as a pointer out of a reference to a UuidX. The stored bit length is an invariant (as it’s needed for the …_any_t to be usable).
(Internally, this is emulated and a ble_uuid128_t-like structure is used to ease and because the author sees no reason to treat shorter numerics as scalars rather than arrays.)
Fields§
§u: ble_uuid_t
§value: [u8; 2]
Implementations§
Trait Implementations§
Source§impl<'a> Into<*const ble_uuid_t> for &'a Uuid16
Useful for building values for things like ble_gatt_svc_def
that take a pointer to a
ble_uuid_t rather than to a ble_uuid_any_t, probably to simplify casting in C.
impl<'a> Into<*const ble_uuid_t> for &'a Uuid16
Useful for building values for things like ble_gatt_svc_def
that take a pointer to a
ble_uuid_t rather than to a ble_uuid_any_t, probably to simplify casting in C.
Source§fn into(self) -> *const ble_uuid_t
fn into(self) -> *const ble_uuid_t
Auto Trait Implementations§
impl Freeze for Uuid16
impl RefUnwindSafe for Uuid16
impl Send for Uuid16
impl Sync for Uuid16
impl Unpin for Uuid16
impl UnwindSafe for Uuid16
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoSwitch for T
impl<T> IntoSwitch for T
Source§fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
Source§fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 3 bytes