pub enum AdStructure<'a> {
Show 13 variants
Flags(u8),
IncompleteServiceUuids16(&'a [[u8; 2]]),
CompleteServiceUuids16(&'a [[u8; 2]]),
IncompleteServiceUuids32(&'a [[u8; 4]]),
CompleteServiceUuids32(&'a [[u8; 4]]),
IncompleteServiceUuids128(&'a [[u8; 16]]),
CompleteServiceUuids128(&'a [[u8; 16]]),
TxPowerLevel(i8),
ServiceData16 {
uuid: [u8; 2],
data: &'a [u8],
},
CompleteLocalName(&'a [u8]),
ShortenedLocalName(&'a [u8]),
ManufacturerSpecificData {
company_identifier: u16,
payload: &'a [u8],
},
Unknown {
ty: u8,
data: &'a [u8],
},
}Expand description
Advertisement data structure.
Variants§
Flags(u8)
Device flags and baseband capabilities.
This should be sent if any flags apply to the device. If not (ie. the value sent would be 0), this may be omitted.
Must not be used in scan response data.
IncompleteServiceUuids16(&'a [[u8; 2]])
Incomplete List of 16-bit service UUIDs. The UUID data matches the ble network’s endian order (should be little endian).
CompleteServiceUuids16(&'a [[u8; 2]])
Complete List of 16-bit service UUIDs. The UUID data matches the ble network’s endian order (should be little endian).
IncompleteServiceUuids32(&'a [[u8; 4]])
Incomplete List of 32-bit service UUIDs. The UUID data matches the ble network’s endian order (should be little endian).
CompleteServiceUuids32(&'a [[u8; 4]])
Complete List of 32-bit service UUIDs. The UUID data matches the ble network’s endian order (should be little endian).
IncompleteServiceUuids128(&'a [[u8; 16]])
Incomplete List of 128-bit service UUIDs. The UUID data matches the ble network’s endian order (should be little endian).
CompleteServiceUuids128(&'a [[u8; 16]])
Complete List of 128-bit service UUIDs. The UUID data matches the ble network’s endian order (should be little endian).
TxPowerLevel(i8)
Sets the Tx Power Level in dBm.
ServiceData16
Service data with 16-bit service UUID. The UUID data matches the ble network’s endian order (should be little endian).
Fields
CompleteLocalName(&'a [u8])
Sets the full (unabbreviated) device name.
This will be shown to the user when this device is found.
ShortenedLocalName(&'a [u8])
Sets the shortened device name.
ManufacturerSpecificData
Set manufacturer specific data
Unknown
An unknown or unimplemented AD structure stored as raw bytes.
Implementations§
Source§impl AdStructure<'_>
impl AdStructure<'_>
Sourcepub fn encode_slice(
data: &[AdStructure<'_>],
dest: &mut [u8],
) -> Result<usize, Error>
pub fn encode_slice( data: &[AdStructure<'_>], dest: &mut [u8], ) -> Result<usize, Error>
Encode a slice of advertisement structures into a buffer.
Trait Implementations§
Source§impl<'a> Clone for AdStructure<'a>
impl<'a> Clone for AdStructure<'a>
Source§fn clone(&self) -> AdStructure<'a>
fn clone(&self) -> AdStructure<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more