trouble-host

Crates

git

Versions

default

Flavors

ConnectionEvent

Enum ConnectionEvent 

Source
pub enum ConnectionEvent {
Show 14 variants Disconnected { reason: Status, }, PhyUpdated { tx_phy: PhyKind, rx_phy: PhyKind, }, ConnectionParamsUpdated { conn_interval: Duration, peripheral_latency: u16, supervision_timeout: Duration, }, DataLengthUpdated { max_tx_octets: u16, max_tx_time: u16, max_rx_octets: u16, max_rx_time: u16, }, FrameSpaceUpdated { frame_space: Duration, initiator: FrameSpaceInitiator, phys: PhyMask, spacing_types: SpacingTypes, }, ConnectionRateChanged { conn_interval: Duration, subrate_factor: u16, peripheral_latency: u16, continuation_number: u16, supervision_timeout: Duration, }, RequestConnectionParams(ConnectionParamsRequest), PassKeyDisplay(PassKey), PassKeyConfirm(PassKey), PassKeyInput, PairingComplete { security_level: SecurityLevel, bond: Option<BondInformation>, }, PairingFailed(Error), BondLost, OobRequest,
}
Expand description

A connection event.

Variants§

§

Disconnected

Connection disconnected.

Fields

§reason: Status

The reason (status code) for the disconnect.

§

PhyUpdated

The phy settings was updated for this connection.

Fields

§tx_phy: PhyKind

The TX phy.

§rx_phy: PhyKind

The RX phy.

§

ConnectionParamsUpdated

The phy settings was updated for this connection.

Fields

§conn_interval: Duration

Connection interval.

§peripheral_latency: u16

Peripheral latency.

§supervision_timeout: Duration

Supervision timeout.

§

DataLengthUpdated

The data length was changed for this connection.

Fields

§max_tx_octets: u16

Max TX octets.

§max_tx_time: u16

Max TX time.

§max_rx_octets: u16

Max RX octets.

§max_rx_time: u16

Max RX time.

§

FrameSpaceUpdated

The frame space was updated for this connection.

Fields

§frame_space: Duration

The negotiated frame space value.

§initiator: FrameSpaceInitiator

Who initiated the frame space update.

§phys: PhyMask

PHYs affected.

§spacing_types: SpacingTypes

Spacing types affected.

§

ConnectionRateChanged

Connection rate has been changed.

Fields

§conn_interval: Duration

Connection interval.

§subrate_factor: u16

Subrate factor.

§peripheral_latency: u16

Peripheral latency.

§continuation_number: u16

Continuation number.

§supervision_timeout: Duration

Supervision timeout.

§

RequestConnectionParams(ConnectionParamsRequest)

A request to change the connection parameters.

ConnectionParamsRequest::accept() or ConnectionParamsRequest::reject() must be called to respond to the request.

§

PassKeyDisplay(PassKey)

Request to display a pass key

§

PassKeyConfirm(PassKey)

Request to display and confirm a pass key

§

PassKeyInput

Request to make the user input the pass key

§

PairingComplete

Pairing completed

Fields

§security_level: SecurityLevel

Security level of this pairing

§bond: Option<BondInformation>

Bond information if the devices create a bond with this pairing.

§

PairingFailed(Error)

Pairing completed

§

BondLost

The peer has lost its bond (received pairing request for a bonded peer).

§

OobRequest

OOB data is requested during pairing. Respond with Connection::provide_oob_data().

Trait Implementations§

Source§

impl Debug for ConnectionEvent

Source§

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

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

impl Format for ConnectionEvent

Source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.

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> 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, 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V