pub enum AdStructure<'a> {
Flags(u8),
ServiceUuids16(&'a [[u8; 2]]),
ServiceUuids128(&'a [[u8; 16]]),
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.
ServiceUuids16(&'a [[u8; 2]])
List of 16-bit service UUIDs. The UUID data matches the ble network’s endian order (should be little endian).
ServiceUuids128(&'a [[u8; 16]])
List of 128-bit service UUIDs. The UUID data matches the ble network’s endian order (should be little endian).
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