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.
PhyUpdated
The phy settings was updated for this connection.
ConnectionParamsUpdated
The phy settings was updated for this connection.
Fields
DataLengthUpdated
The data length was changed for this connection.
Fields
FrameSpaceUpdated
The frame space was updated for this connection.
Fields
initiator: FrameSpaceInitiatorWho initiated the frame space update.
spacing_types: SpacingTypesSpacing types affected.
ConnectionRateChanged
Connection rate has been changed.
Fields
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: SecurityLevelSecurity 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().