pub struct SimulateCharacteristicOperationResponseParams<'a> { /* private fields */ }Expand description
Simulates the response from the characteristic with |characteristicId| for a characteristic operation of |type|. The |code| value follows the Error Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response. The |data| is expected to exist when simulating a successful read operation response.
Implementations§
Source§impl<'a> SimulateCharacteristicOperationResponseParams<'a>
impl<'a> SimulateCharacteristicOperationResponseParams<'a>
Sourcepub fn builder(
characteristic_id: impl Into<Cow<'a, str>>,
type_: impl Into<CharacteristicOperationType>,
code: i64,
) -> SimulateCharacteristicOperationResponseParamsBuilder<'a>
pub fn builder( characteristic_id: impl Into<Cow<'a, str>>, type_: impl Into<CharacteristicOperationType>, code: i64, ) -> SimulateCharacteristicOperationResponseParamsBuilder<'a>
Creates a builder for this type with the required parameters:
characteristic_id:type_:code:
pub fn characteristic_id(&self) -> &str
pub fn type_(&self) -> &CharacteristicOperationType
pub fn code(&self) -> i64
pub fn data(&self) -> Option<&str>
Trait Implementations§
Source§impl<'a> CdpCommand<'a> for SimulateCharacteristicOperationResponseParams<'a>
impl<'a> CdpCommand<'a> for SimulateCharacteristicOperationResponseParams<'a>
Source§impl<'a> Clone for SimulateCharacteristicOperationResponseParams<'a>
impl<'a> Clone for SimulateCharacteristicOperationResponseParams<'a>
Source§fn clone(&self) -> SimulateCharacteristicOperationResponseParams<'a>
fn clone(&self) -> SimulateCharacteristicOperationResponseParams<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for SimulateCharacteristicOperationResponseParams<'a>
impl<'a> Debug for SimulateCharacteristicOperationResponseParams<'a>
Source§impl<'a> Default for SimulateCharacteristicOperationResponseParams<'a>
impl<'a> Default for SimulateCharacteristicOperationResponseParams<'a>
Source§fn default() -> SimulateCharacteristicOperationResponseParams<'a>
fn default() -> SimulateCharacteristicOperationResponseParams<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for SimulateCharacteristicOperationResponseParams<'a>
impl<'de, 'a> Deserialize<'de> for SimulateCharacteristicOperationResponseParams<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for SimulateCharacteristicOperationResponseParams<'a>
impl<'a> RefUnwindSafe for SimulateCharacteristicOperationResponseParams<'a>
impl<'a> Send for SimulateCharacteristicOperationResponseParams<'a>
impl<'a> Sync for SimulateCharacteristicOperationResponseParams<'a>
impl<'a> Unpin for SimulateCharacteristicOperationResponseParams<'a>
impl<'a> UnsafeUnpin for SimulateCharacteristicOperationResponseParams<'a>
impl<'a> UnwindSafe for SimulateCharacteristicOperationResponseParams<'a>
Blanket Implementations§
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
Mutably borrows from an owned value. Read more