CHHapticDeviceCapability

Trait CHHapticDeviceCapability 

Source
pub unsafe trait CHHapticDeviceCapability {
    // Provided methods
    unsafe fn supportsHaptics(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn supportsAudio(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn attributesForEventParameter_eventType_error(
        &self,
        in_parameter: &CHHapticEventParameterID,
        type: &CHHapticEventType,
    ) -> Result<Retained<ProtocolObject<dyn CHHapticParameterAttributes>>, Retained<NSError>>
       where Self: Sized + Message { ... }
    unsafe fn attributesForDynamicParameter_error(
        &self,
        in_parameter: &CHHapticDynamicParameterID,
    ) -> Result<Retained<ProtocolObject<dyn CHHapticParameterAttributes>>, Retained<NSError>>
       where Self: Sized + Message { ... }
}
Available on crate feature CHHapticDeviceCapability only.
Expand description

A protocol which defines properties describing haptics and audio capabilities for a particular device. These properties include limitations and ranges of parameters.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn supportsHaptics(&self) -> bool
where Self: Sized + Message,

Returns YES if the hardware supports haptic event playback.

Source

unsafe fn supportsAudio(&self) -> bool
where Self: Sized + Message,

Returns YES if the hardware supports audio event playback.

Source

unsafe fn attributesForEventParameter_eventType_error( &self, in_parameter: &CHHapticEventParameterID, type: &CHHapticEventType, ) -> Result<Retained<ProtocolObject<dyn CHHapticParameterAttributes>>, Retained<NSError>>
where Self: Sized + Message,

Available on crate features CHHapticEvent and CHHapticParameter only.

Return information about the given CHHapticEventParameter as it applies to the specified event type.

Parameter inParameter: A CHHapticEventParameter to be queried.

Parameter type: A CHHapticEventType to be queried.

Parameter outError: If the operation fails, this will be set to a valid NSError describing the error.

These values may vary across different device types.

Source

unsafe fn attributesForDynamicParameter_error( &self, in_parameter: &CHHapticDynamicParameterID, ) -> Result<Retained<ProtocolObject<dyn CHHapticParameterAttributes>>, Retained<NSError>>
where Self: Sized + Message,

Available on crate feature CHHapticParameter only.

Return information about the given CHHapticDynamicParameter.

Parameter inParameter: A CHHapticDynamicParameter to be queried.

Parameter outError: If the operation fails, this will be set to a valid NSError describing the error.

These values may vary across different device types.

Trait Implementations§

Source§

impl ProtocolType for dyn CHHapticDeviceCapability

Source§

const NAME: &'static str = "CHHapticDeviceCapability"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn CHHapticDeviceCapability

Implementations on Foreign Types§

Source§

impl<T> CHHapticDeviceCapability for ProtocolObject<T>

Implementors§