PbBleDevice

Struct PbBleDevice 

Source
pub struct PbBleDevice {
Show 28 fields pub paired: PbSystemDateTime, pub last_modified: PbSystemDateTime, pub manufacturer: i32, pub deleted_time_stamp: Option<PbSystemDateTime>, pub mac: Option<PbBleMac>, pub device_id: Option<String>, pub name: Option<String>, pub battery_level: Option<u32>, pub manufacturer_name: Option<String>, pub model_name: Option<String>, pub peer_ltk: Option<Vec<u8>>, pub peer_irk: Option<Vec<u8>>, pub peer_csrk: Option<Vec<u8>>, pub available_features: Vec<i32>, pub services: Vec<PbBleService>, pub peer_rand: Option<Vec<u8>>, pub peer_ediv: Option<u32>, pub encr_key_size: Option<u32>, pub distributed_keys: Option<u32>, pub authenticated: Option<bool>, pub sensor_location: Option<i32>, pub software_version: Option<String>, pub secondary_software_version: Option<String>, pub serial_number: Option<String>, pub local_ltk: Option<Vec<u8>>, pub local_rand: Option<Vec<u8>>, pub local_ediv: Option<u32>, pub user_data: Vec<PbBleUser>,
}

Fields§

§paired: PbSystemDateTime§last_modified: PbSystemDateTime§manufacturer: i32§deleted_time_stamp: Option<PbSystemDateTime>§mac: Option<PbBleMac>§device_id: Option<String>§name: Option<String>§battery_level: Option<u32>§manufacturer_name: Option<String>§model_name: Option<String>§peer_ltk: Option<Vec<u8>>§peer_irk: Option<Vec<u8>>§peer_csrk: Option<Vec<u8>>§available_features: Vec<i32>§services: Vec<PbBleService>§peer_rand: Option<Vec<u8>>§peer_ediv: Option<u32>§encr_key_size: Option<u32>§distributed_keys: Option<u32>§authenticated: Option<bool>§sensor_location: Option<i32>§software_version: Option<String>§secondary_software_version: Option<String>§serial_number: Option<String>§local_ltk: Option<Vec<u8>>§local_rand: Option<Vec<u8>>§local_ediv: Option<u32>§user_data: Vec<PbBleUser>

Implementations§

Source§

impl PbBleDevice

Source

pub fn manufacturer(&self) -> PbDeviceManufacturerType

Source

pub fn set_manufacturer(&mut self, value: PbDeviceManufacturerType)

Source

pub fn device_id(&self) -> &str

Source

pub fn name(&self) -> &str

Source

pub fn battery_level(&self) -> u32

Source

pub fn manufacturer_name(&self) -> &str

Source

pub fn model_name(&self) -> &str

Source

pub fn peer_ltk(&self) -> &[u8]

Source

pub fn peer_irk(&self) -> &[u8]

Source

pub fn peer_csrk(&self) -> &[u8]

Source

pub fn available_features( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<PbFeatureType>>

Source

pub fn push_available_features(&mut self, value: PbFeatureType)

Source

pub fn peer_rand(&self) -> &[u8]

Source

pub fn peer_ediv(&self) -> u32

Source

pub fn encr_key_size(&self) -> u32

Source

pub fn distributed_keys(&self) -> u32

Source

pub fn authenticated(&self) -> bool

Source

pub fn sensor_location(&self) -> PbSensorLocation

Source

pub fn set_sensor_location(&mut self, value: PbSensorLocation)

Source

pub fn software_version(&self) -> &str

Source

pub fn secondary_software_version(&self) -> &str

Source

pub fn serial_number(&self) -> &str

Source

pub fn local_ltk(&self) -> &[u8]

Source

pub fn local_rand(&self) -> &[u8]

Source

pub fn local_ediv(&self) -> u32

Trait Implementations§

Source§

impl Clone for PbBleDevice

Source§

fn clone(&self) -> PbBleDevice

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for PbBleDevice

Source§

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

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

impl Default for PbBleDevice

Source§

fn default() -> PbBleDevice

Returns the “default value” for a type. Read more
Source§

impl Message for PbBleDevice

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: IntoBuf, Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: IntoBuf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: IntoBuf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: IntoBuf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for PbBleDevice

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for PbBleDevice

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.