Skip to main content

Want

Enum Want 

Source
pub enum Want {
    Request(RequestDeviceOptions),
    Scan {
        options: RequestDeviceOptions,
        keep_repeated: bool,
    },
    Device {
        id: String,
        grant: Grant,
    },
}
Expand description

Why something is watching the radio.

The hub keeps one scan for all of them and hands each watcher only what it asked for, so a request_device finishing cannot stop somebody else’s watchAdvertisements.

Variants§

§

Request(RequestDeviceOptions)

A requestDevice chooser. Duplicates are wanted: they keep RSSI live while the chooser is deciding.

§

Scan

requestLEScan.

Fields

§options: RequestDeviceOptions

What the caller asked for, which is also what it may be told.

§keep_repeated: bool

Whether repeated sightings of the same device are wanted.

§

Device

watchAdvertisements on one granted device — every packet from it, but reported through the grant that device was given. One device’s advertisements — watchAdvertisements.

Fields

§id: String

Which device.

§grant: Grant

What the holder may be told about it.

Auto Trait Implementations§

§

impl Freeze for Want

§

impl RefUnwindSafe for Want

§

impl Send for Want

§

impl Sync for Want

§

impl Unpin for Want

§

impl UnsafeUnpin for Want

§

impl UnwindSafe for Want

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.