[][src]Struct rubble::link::ad_structure::ServiceUuids

pub struct ServiceUuids<'a, T: IsUuid> { /* fields omitted */ }

List of service UUIDs offered by the device.

The list can be marked as complete or incomplete. For an incomplete list, more UUIDs can be sent in the scan response.

The ServiceUuids type can handle 16-, 32-, and full-size 128-bit UUIDs.

Methods

impl<'a, T: IsUuid> ServiceUuids<'a, T>[src]

pub fn from_uuids(complete: bool, uuids: &'a [T]) -> Self[src]

Creates a ServiceUuids container from a list of UUIDs.

pub fn is_complete(&self) -> bool[src]

Returns a boolean indicating whether this list is complete.

If this returns false, the device offers more services not contained in this list.

pub fn iter(&self) -> impl Iterator<Item = T> + 'a[src]

Returns an iterator over the UUIDs stored in self.

Trait Implementations

impl<'a, T: IsUuid> ToBytes for ServiceUuids<'a, T>[src]

impl<'a, T: IsUuid> FromBytes<'a> for ServiceUuids<'a, T>[src]

Decodes ServiceUuids from a byte sequence containing:

  • TYPE: The right "(In)complete List of N-bit Service Class UUIDs" type. Both the complete and incomplete type are accepted.
  • UUID...: n*2/4/16 Bytes of UUID data, in little endian.

impl<'a, T: Copy + IsUuid> Copy for ServiceUuids<'a, T>[src]

impl<'a, T: Debug + IsUuid> Debug for ServiceUuids<'a, T>[src]

impl<'a, T: Clone + IsUuid> Clone for ServiceUuids<'a, T>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<'a, T> Send for ServiceUuids<'a, T> where
    T: Sync

impl<'a, T> Sync for ServiceUuids<'a, T> where
    T: Sync

Blanket Implementations

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> From for T[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]