pub trait DeviceProxyInterface: Send + Sync {
type StartVibrationResponseFut: Future<Output = Result<DeviceStartVibrationResult, Error>> + Send;
type PlayVibrationResponseFut: Future<Output = Result<DevicePlayVibrationResult, Error>> + Send;
type PlayEffectResponseFut: Future<Output = Result<DevicePlayEffectResult, Error>> + Send;
type PlayCompositeWaveformResponseFut: Future<Output = Result<DevicePlayCompositeWaveformResult, Error>> + Send;
type StopVibrationResponseFut: Future<Output = Result<DeviceStopVibrationResult, Error>> + Send;
type SetAmplitudeResponseFut: Future<Output = Result<DeviceSetAmplitudeResult, Error>> + Send;
type GetPropertiesResponseFut: Future<Output = Result<DeviceGetPropertiesResult, Error>> + Send;
// Required methods
fn start_vibration(&self) -> Self::StartVibrationResponseFut;
fn play_vibration(&self, duration: i64) -> Self::PlayVibrationResponseFut;
fn play_effect(
&self,
effect: Effect,
strength: EffectStrength,
) -> Self::PlayEffectResponseFut;
fn play_composite_waveform(
&self,
composite_waveform: &[CompositeEffect],
) -> Self::PlayCompositeWaveformResponseFut;
fn stop_vibration(&self) -> Self::StopVibrationResponseFut;
fn set_amplitude(&self, amplitude: f32) -> Self::SetAmplitudeResponseFut;
fn get_properties(&self) -> Self::GetPropertiesResponseFut;
}Required Associated Types§
type StartVibrationResponseFut: Future<Output = Result<DeviceStartVibrationResult, Error>> + Send
type PlayVibrationResponseFut: Future<Output = Result<DevicePlayVibrationResult, Error>> + Send
type PlayEffectResponseFut: Future<Output = Result<DevicePlayEffectResult, Error>> + Send
type PlayCompositeWaveformResponseFut: Future<Output = Result<DevicePlayCompositeWaveformResult, Error>> + Send
type StopVibrationResponseFut: Future<Output = Result<DeviceStopVibrationResult, Error>> + Send
type SetAmplitudeResponseFut: Future<Output = Result<DeviceSetAmplitudeResult, Error>> + Send
type GetPropertiesResponseFut: Future<Output = Result<DeviceGetPropertiesResult, Error>> + Send
Required Methods§
fn start_vibration(&self) -> Self::StartVibrationResponseFut
fn play_vibration(&self, duration: i64) -> Self::PlayVibrationResponseFut
fn play_effect( &self, effect: Effect, strength: EffectStrength, ) -> Self::PlayEffectResponseFut
fn play_composite_waveform( &self, composite_waveform: &[CompositeEffect], ) -> Self::PlayCompositeWaveformResponseFut
fn stop_vibration(&self) -> Self::StopVibrationResponseFut
fn set_amplitude(&self, amplitude: f32) -> Self::SetAmplitudeResponseFut
fn get_properties(&self) -> Self::GetPropertiesResponseFut
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".