pub struct Peer {
pub id: Option<PeerId>,
pub connectable: Option<bool>,
pub rssi: Option<i8>,
pub advertising_data: Option<AdvertisingData>,
pub name: Option<String>,
pub data: Option<ScanData>,
pub bonded: Option<bool>,
pub last_updated: Option<i64>,
pub advertising_sid: Option<u8>,
pub periodic_advertising_interval: Option<u16>,
/* private fields */
}
Expand description
Represents a Bluetooth Low Energy peer that may act in the broadcaster, peripheral, or central role. The peer’s role depends on whether it is obtained from the Central or Peripheral protocol.
Fields§
§id: Option<PeerId>
Uniquely identifies this peer on the current system.
This field is always present.
connectable: Option<bool>
Whether or not this peer is connectable. Non-connectable peers are typically in the LE broadcaster role.
This field is always present.
rssi: Option<i8>
The last observed signal strength of this peer. This field is only present for a peer that is broadcasting. The RSSI can be stale if the peer has not been advertising.
NOTE: This field should NOT be confused with the “connection RSSI” of a peer that is currently connected to the system.
advertising_data: Option<AdvertisingData>
§name: Option<String>
The name of this peer. The name is often obtained during a scan procedure and can get updated during the name discovery procedure following a connection.
This field is present if the name is known.
data: Option<ScanData>
Information from advertising and scan response data broadcast by this peer. When present, this contains the advertising data last received from the peer.
bonded: Option<bool>
Whether or not this peer is bonded.
This field is always present.
last_updated: Option<i64>
The value of the system monotonic clock, measured at the time this peer was last updated (e.g. due to reception of an advertisement).
This field is always present.
advertising_sid: Option<u8>
Value of the Advertising SID.
Range: 0x00 to 0x0F
periodic_advertising_interval: Option<u16>
Interval of the periodic advertising.
Range: 0x0006 to 0xFFFF
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<Peer, D> for Peer
impl<D: ResourceDialect> Decode<Peer, D> for Peer
Source§impl TypeMarker for Peer
impl TypeMarker for Peer
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for Peer
impl ValueTypeMarker for Peer
impl Persistable for Peer
impl StructuralPartialEq for Peer
Auto Trait Implementations§
impl Freeze for Peer
impl RefUnwindSafe for Peer
impl Send for Peer
impl Sync for Peer
impl Unpin for Peer
impl UnwindSafe for Peer
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)