SyncCmd

Trait SyncCmd 

Source
pub trait SyncCmd: Cmd {
    type Return: for<'a> FromHciBytes<'a> + Copy;
    type Handle: FixedSizeValue;
    type ReturnBuf: CmdReturnBuf;

    // Required methods
    fn param_handle(&self) -> Self::Handle;
    fn return_handle(_data: &[u8]) -> Result<Self::Handle, FromHciBytesError>;

    // Provided method
    fn exec<C: ControllerCmdSync<Self>>(
        &self,
        controller: &C,
    ) -> impl Future<Output = Result<Self::Return, Error<<C as ErrorType>::Error>>> { ... }
}
Expand description

A trait for objects representing HCI Commands that generate CommandComplete events

Required Associated Types§

Source

type Return: for<'a> FromHciBytes<'a> + Copy

The type of the parameters for the CommandComplete event

Source

type Handle: FixedSizeValue

Handle returned by this command.

Source

type ReturnBuf: CmdReturnBuf

Return buffer used by this command.

Required Methods§

Source

fn param_handle(&self) -> Self::Handle

Handle parameter for this command.

Source

fn return_handle(_data: &[u8]) -> Result<Self::Handle, FromHciBytesError>

Extracts the Self::Handle from the return parameters for commands that return a handle.

If the command takes a handle or BdAddr and returns it as the first parameter of the associated CommandComplete event, this method will extract that handle from the return parameters. This is needed to identify which command the CommandComplete event was for in the event that the status of the command was an error.

See Bluetooth Core Specification Vol 4, Part E, §4.5

Provided Methods§

Source

fn exec<C: ControllerCmdSync<Self>>( &self, controller: &C, ) -> impl Future<Output = Result<Self::Return, Error<<C as ErrorType>::Error>>>

Run the command on the provided controller.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl SyncCmd for HostBufferSize

Source§

impl SyncCmd for ReadAuthenticatedPayloadTimeout

Source§

impl SyncCmd for ReadStoredLinkKey

Source§

impl SyncCmd for ReadTransmitPowerLevel

Source§

impl SyncCmd for Reset

Source§

impl SyncCmd for SetControllerToHostFlowControl

Source§

impl SyncCmd for SetEventMask

Source§

impl SyncCmd for SetEventMaskPage2

Source§

impl SyncCmd for WriteAuthenticatedPayloadTimeout

Source§

impl SyncCmd for ReadBdAddr

Source§

impl SyncCmd for ReadLocalSupportedCmds

Source§

impl SyncCmd for ReadLocalSupportedFeatures

Source§

impl SyncCmd for ReadLocalVersionInformation

Source§

impl SyncCmd for LeAddDeviceToFilterAcceptList

Source§

impl SyncCmd for LeAddDeviceToPeriodicAdvList

Source§

impl SyncCmd for LeAddDeviceToResolvingList

Source§

impl SyncCmd for LeClearAdvSets

Source§

impl SyncCmd for LeClearFilterAcceptList

Source§

impl SyncCmd for LeClearPeriodicAdvList

Source§

impl SyncCmd for LeClearResolvingList

Source§

impl SyncCmd for LeConnCteResponseEnable

Source§

impl SyncCmd for LeCreateConnCancel

Source§

impl SyncCmd for LeEncrypt

Source§

impl SyncCmd for LeEnhancedReadTransmitPowerLevel

Source§

impl SyncCmd for LeLongTermKeyRequestNegativeReply

Source§

impl SyncCmd for LeLongTermKeyRequestReply

Source§

impl SyncCmd for LePeriodicAdvCreateSyncCancel

Source§

impl SyncCmd for LePeriodicAdvSetInfoTransfer

Source§

impl SyncCmd for LePeriodicAdvSyncTransfer

Source§

impl SyncCmd for LePeriodicAdvTerminateSync

Source§

impl SyncCmd for LeRand

Source§

impl SyncCmd for LeReadAdvPhysicalChannelTxPower

Source§

impl SyncCmd for LeReadAntennaInformation

Source§

impl SyncCmd for LeReadBufferSize

Source§

impl SyncCmd for LeReadChannelMap

Source§

impl SyncCmd for LeReadFilterAcceptListSize

Source§

impl SyncCmd for LeReadLocalSupportedFeatures

Source§

impl SyncCmd for LeReadMaxAdvDataLength

Source§

impl SyncCmd for LeReadMaxDataLength

Source§

impl SyncCmd for LeReadNumberOfSupportedAdvSets

Source§

impl SyncCmd for LeReadPeriodicAdvListSize

Source§

impl SyncCmd for LeReadPhy

Source§

impl SyncCmd for LeReadResolvingListSize

Source§

impl SyncCmd for LeReadRfPathCompensation

Source§

impl SyncCmd for LeReadSuggestedDefaultDataLength

Source§

impl SyncCmd for LeReadSupportedStates

Source§

impl SyncCmd for LeReadTransmitPower

Source§

impl SyncCmd for LeRemoveAdvSet

Source§

impl SyncCmd for LeRemoveDeviceFromFilterAcceptList

Source§

impl SyncCmd for LeRemoveDeviceFromPeriodicAdvList

Source§

impl SyncCmd for LeRemoveDeviceFromResolvingList

Source§

impl SyncCmd for LeSetAddrResolutionEnable

Source§

impl SyncCmd for LeSetAdvData

Source§

impl SyncCmd for LeSetAdvEnable

Source§

impl SyncCmd for LeSetAdvParams

Source§

impl SyncCmd for LeSetAdvSetRandomAddr

Source§

impl SyncCmd for LeSetConnectionlessCteTransmitEnable

Source§

impl SyncCmd for LeSetDataLength

Source§

impl SyncCmd for LeSetDataRelatedAddrChanges

Source§

impl SyncCmd for LeSetDefaultPeriodicAdvSyncTransferParams

Source§

impl SyncCmd for LeSetDefaultPhy

Source§

impl SyncCmd for LeSetEventMask

Source§

impl SyncCmd for LeSetExtAdvParams

Source§

impl SyncCmd for LeSetExtAdvParamsV2

Source§

impl SyncCmd for LeSetExtScanEnable

Source§

impl SyncCmd for LeSetExtScanParams

Source§

impl SyncCmd for LeSetHostChannelClassification

Source§

impl SyncCmd for LeSetHostFeature

Source§

impl SyncCmd for LeSetHostFeatureV2

Source§

impl SyncCmd for LeSetPathLossReportingEnable

Source§

impl SyncCmd for LeSetPathLossReportingParams

Source§

impl SyncCmd for LeSetPeriodicAdvEnable

Source§

impl SyncCmd for LeSetPeriodicAdvParams

Source§

impl SyncCmd for LeSetPeriodicAdvParamsV2

Source§

impl SyncCmd for LeSetPeriodicAdvReceiveEnable

Source§

impl SyncCmd for LeSetPeriodicAdvSyncTransferParams

Source§

impl SyncCmd for LeSetPrivacyMode

Source§

impl SyncCmd for LeSetRandomAddr

Source§

impl SyncCmd for LeSetResolvablePrivateAddrTimeout

Source§

impl SyncCmd for LeSetScanEnable

Source§

impl SyncCmd for LeSetScanParams

Source§

impl SyncCmd for LeSetScanResponseData

Source§

impl SyncCmd for LeSetTransmitPowerReportingEnable

Source§

impl SyncCmd for LeTestEnd

Source§

impl SyncCmd for LeWriteRfPathCompensation

Source§

impl SyncCmd for LeWriteSuggestedDefaultDataLength

Source§

impl SyncCmd for AcceptConnectionRequest

Source§

impl SyncCmd for AcceptSynchronousConnectionRequest

Source§

impl SyncCmd for AuthenticationRequested

Source§

impl SyncCmd for ChangeConnectionLinkKey

Source§

impl SyncCmd for ChangeConnectionPacketType

Source§

impl SyncCmd for CreateConnection

Source§

impl SyncCmd for CreateConnectionCancel

Source§

impl SyncCmd for Disconnect

Source§

impl SyncCmd for EnhancedAcceptSynchronousConnectionRequest

Source§

impl SyncCmd for EnhancedSetupSynchronousConnection

Source§

impl SyncCmd for ExitPeriodicInquiryMode

Source§

impl SyncCmd for Inquiry

Source§

impl SyncCmd for InquiryCancel

Source§

impl SyncCmd for IoCapabilityRequestNegativeReply

Source§

impl SyncCmd for IoCapabilityRequestReply

Source§

impl SyncCmd for LinkKeyRequestNegativeReply

Source§

impl SyncCmd for LinkKeyRequestReply

Source§

impl SyncCmd for LinkKeySelection

Source§

impl SyncCmd for PinCodeRequestReply

Source§

impl SyncCmd for ReadClockOffset

Source§

impl SyncCmd for ReadLmpHandle

Source§

impl SyncCmd for ReadRemoteExtendedFeatures

Source§

impl SyncCmd for ReadRemoteSupportedFeatures

Source§

impl SyncCmd for ReceiveSynchronizationTrain

Source§

impl SyncCmd for RejectConnectionRequest

Source§

impl SyncCmd for RejectSynchronousConnectionRequest

Source§

impl SyncCmd for RemoteNameRequest

Source§

impl SyncCmd for RemoteNameRequestCancel

Source§

impl SyncCmd for RemoteOobDataRequestNegativeReply

Source§

impl SyncCmd for RemoteOobDataRequestReply

Source§

impl SyncCmd for RemoteOobExtendedDataRequestReply

Source§

impl SyncCmd for SetConnectionEncryption

Source§

impl SyncCmd for SetConnectionlessPeripheralBroadcast

Source§

impl SyncCmd for SetConnectionlessPeripheralBroadcastReceive

Source§

impl SyncCmd for SetupSynchronousConnection

Source§

impl SyncCmd for StartSynchronizationTrain

Source§

impl SyncCmd for TruncatedPage

Source§

impl SyncCmd for TruncatedPageCancel

Source§

impl SyncCmd for UserConfirmationRequestNegativeReply

Source§

impl SyncCmd for UserConfirmationRequestReply

Source§

impl SyncCmd for UserPasskeyRequestNegativeReply

Source§

impl SyncCmd for UserPasskeyRequestReply

Source§

impl SyncCmd for ReadRssi

Source§

impl<'a> SyncCmd for HostNumberOfCompletedPackets<'a>

Source§

impl<'a> SyncCmd for LeSetConnCteTransmitParams<'a>

Source§

impl<'a> SyncCmd for LeSetConnectionlessCteTransmitParams<'a>

Source§

impl<'a> SyncCmd for LeSetExtAdvEnable<'a>

Source§

impl<'a> SyncCmd for LeSetPeriodicAdvData<'a>

Source§

impl<'a> SyncCmd for LeSetPeriodicAdvResponseData<'a>

Source§

impl<'a> SyncCmd for LeSetPeriodicAdvSubeventData<'a>

Source§

impl<'a> SyncCmd for LeSetPeriodicSyncSubevent<'a>

Source§

impl<'d> SyncCmd for LeSetExtAdvData<'d>

Source§

impl<'d> SyncCmd for LeSetExtScanResponseData<'d>