Skip to main content

Eddystone

Enum Eddystone 

Source
pub enum Eddystone {
    Uid {
        tx_power: i8,
        namespace: [u8; 10],
        instance: [u8; 6],
    },
    Url {
        tx_power: i8,
        url: String,
    },
    Tlm {
        battery_mv: Option<u16>,
        temperature: Option<f64>,
        adv_count: u32,
        uptime: f64,
    },
    EncryptedTlm {
        etlm: [u8; 12],
        salt: u16,
        mic: u16,
    },
    Eid {
        tx_power: i8,
        eid: [u8; 8],
    },
}
Expand description

An Eddystone frame.

Variants§

§

Uid

Eddystone-UID (0x00).

Fields

§tx_power: i8

Calibrated TX power at 0 m, dBm.

§namespace: [u8; 10]

10-byte namespace.

§instance: [u8; 6]

6-byte instance.

§

Url

Eddystone-URL (0x10).

Fields

§tx_power: i8

Calibrated TX power at 0 m, dBm.

§url: String

The URL, expanded.

§

Tlm

Eddystone-TLM (0x20), version 0: telemetry in the clear.

Fields

§battery_mv: Option<u16>

Battery voltage, mV; None when the beacon does not measure it.

§temperature: Option<f64>

Temperature, °C; None when not supported (0x8000).

§adv_count: u32

Advertising PDUs sent since power-on or reboot.

§uptime: f64

Time since power-on or reboot, seconds (0.1 s resolution).

§

EncryptedTlm

Eddystone-TLM version 1 (encrypted, for EID beacons).

Fields

§etlm: [u8; 12]

The encrypted telemetry.

§salt: u16

Salt.

§mic: u16

Message integrity check.

§

Eid

Eddystone-EID (0x30): an ephemeral identifier.

Fields

§tx_power: i8

Calibrated TX power at 0 m, dBm.

§eid: [u8; 8]

The 8-byte ephemeral identifier.

Trait Implementations§

Source§

impl Clone for Eddystone

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Eddystone

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Eddystone

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Eddystone

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Eddystone

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.