[−][src]Enum rubble::link::ad_structure::AdStructure
A list of AD structures can be sent along with an advertising packet or scan response.
This mechanism allows a scanner to, for example, receive the device's name without having to establish a connection.
Unless otherwise noted, each variant of this enum should only be included at most once per packet sent.
From a very unrepresentative scan, most devices seem to include Flags and Manufacturer Data, and optionally a device name, of course.
Variants
Flags(Flags)
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(ServiceUuids<'a, Uuid16>)
ServiceUuids32(ServiceUuids<'a, Uuid32>)
ServiceUuids128(ServiceUuids<'a, Uuid>)
ServiceData16
Service data with 16-bit service UUID.
Fields of ServiceData16
CompleteLocalName(&'a str)
Sets the full (unabbreviated) device name.
This will be shown to the user when this device is found.
ShortenedLocalName(&'a str)
Sets the shortened device name.
Unknown
An unknown or unimplemented AD structure stored as raw bytes.
Fields of Unknown
Trait Implementations
impl<'a> ToBytes for AdStructure<'a>
[src]
fn to_bytes(&self, buf: &mut ByteWriter) -> Result<(), Error>
[src]
Lowers this AD structure into a Byte buffer.
Returns the number of Bytes of buf
that are used by this AD structure.
impl<'a> FromBytes<'a> for AdStructure<'a>
[src]
fn from_bytes(bytes: &mut ByteReader<'a>) -> Result<Self, Error>
[src]
impl<'a> Copy for AdStructure<'a>
[src]
impl<'a> Debug for AdStructure<'a>
[src]
impl<'a> From<Flags> for AdStructure<'a>
[src]
impl<'a> Clone for AdStructure<'a>
[src]
fn clone(&self) -> AdStructure<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'a> Send for AdStructure<'a>
impl<'a> Sync for AdStructure<'a>
Blanket Implementations
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> From for T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
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>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,