pub trait PlayerProxyInterface: Send + Sync {
type AddSoundFromFileResponseFut: Future<Output = Result<PlayerAddSoundFromFileResult, Error>> + Send;
type PlaySoundResponseFut: Future<Output = Result<PlayerPlaySoundResult, Error>> + Send;
type PlaySound2ResponseFut: Future<Output = Result<PlayerPlaySound2Result, Error>> + Send;
// Required methods
fn add_sound_from_file(
&self,
id: u32,
file: ClientEnd<FileMarker>,
) -> Self::AddSoundFromFileResponseFut;
fn add_sound_buffer(
&self,
id: u32,
buffer: Buffer,
stream_type: &AudioStreamType,
) -> Result<(), Error>;
fn remove_sound(&self, id: u32) -> Result<(), Error>;
fn play_sound(
&self,
id: u32,
usage: AudioRenderUsage,
) -> Self::PlaySoundResponseFut;
fn play_sound2(
&self,
id: u32,
usage: AudioRenderUsage2,
) -> Self::PlaySound2ResponseFut;
fn stop_playing_sound(&self, id: u32) -> Result<(), Error>;
}Required Associated Types§
type AddSoundFromFileResponseFut: Future<Output = Result<PlayerAddSoundFromFileResult, Error>> + Send
type PlaySoundResponseFut: Future<Output = Result<PlayerPlaySoundResult, Error>> + Send
type PlaySound2ResponseFut: Future<Output = Result<PlayerPlaySound2Result, Error>> + Send
Required Methods§
fn add_sound_from_file( &self, id: u32, file: ClientEnd<FileMarker>, ) -> Self::AddSoundFromFileResponseFut
fn add_sound_buffer( &self, id: u32, buffer: Buffer, stream_type: &AudioStreamType, ) -> Result<(), Error>
fn remove_sound(&self, id: u32) -> Result<(), Error>
fn play_sound( &self, id: u32, usage: AudioRenderUsage, ) -> Self::PlaySoundResponseFut
fn play_sound2( &self, id: u32, usage: AudioRenderUsage2, ) -> Self::PlaySound2ResponseFut
fn stop_playing_sound(&self, id: u32) -> Result<(), Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".