pub trait AsyncGainControl: AsyncDeviceInfo {
// Required methods
fn async_gain_elements(
&self,
direction: Direction,
channel: usize,
) -> impl Future<Output = Result<Vec<String>, Error>> + MaybeSend + '_;
fn async_set_gain(
&self,
direction: Direction,
channel: usize,
gain: f64,
) -> impl Future<Output = Result<(), Error>> + MaybeSend + '_;
fn async_gain(
&self,
direction: Direction,
channel: usize,
) -> impl Future<Output = Result<Option<f64>, Error>> + MaybeSend + '_;
fn async_gain_range(
&self,
direction: Direction,
channel: usize,
) -> impl Future<Output = Result<Range, Error>> + MaybeSend + '_;
fn async_set_gain_element<'a>(
&'a self,
direction: Direction,
channel: usize,
name: &'a str,
gain: f64,
) -> impl Future<Output = Result<(), Error>> + MaybeSend + 'a;
fn async_gain_element<'a>(
&'a self,
direction: Direction,
channel: usize,
name: &'a str,
) -> impl Future<Output = Result<Option<f64>, Error>> + MaybeSend + 'a;
fn async_gain_element_range<'a>(
&'a self,
direction: Direction,
channel: usize,
name: &'a str,
) -> impl Future<Output = Result<Range, Error>> + MaybeSend + 'a;
}Expand description
Asynchronous gain control capability.
Required Methods§
Sourcefn async_gain_elements(
&self,
direction: Direction,
channel: usize,
) -> impl Future<Output = Result<Vec<String>, Error>> + MaybeSend + '_
fn async_gain_elements( &self, direction: Direction, channel: usize, ) -> impl Future<Output = Result<Vec<String>, Error>> + MaybeSend + '_
Return named gain elements available for the channel.
Sourcefn async_set_gain(
&self,
direction: Direction,
channel: usize,
gain: f64,
) -> impl Future<Output = Result<(), Error>> + MaybeSend + '_
fn async_set_gain( &self, direction: Direction, channel: usize, gain: f64, ) -> impl Future<Output = Result<(), Error>> + MaybeSend + '_
Set overall channel gain in dB.
Sourcefn async_gain(
&self,
direction: Direction,
channel: usize,
) -> impl Future<Output = Result<Option<f64>, Error>> + MaybeSend + '_
fn async_gain( &self, direction: Direction, channel: usize, ) -> impl Future<Output = Result<Option<f64>, Error>> + MaybeSend + '_
Return overall channel gain in dB, if available.
Sourcefn async_gain_range(
&self,
direction: Direction,
channel: usize,
) -> impl Future<Output = Result<Range, Error>> + MaybeSend + '_
fn async_gain_range( &self, direction: Direction, channel: usize, ) -> impl Future<Output = Result<Range, Error>> + MaybeSend + '_
Return supported overall channel gain range in dB.
Sourcefn async_set_gain_element<'a>(
&'a self,
direction: Direction,
channel: usize,
name: &'a str,
gain: f64,
) -> impl Future<Output = Result<(), Error>> + MaybeSend + 'a
fn async_set_gain_element<'a>( &'a self, direction: Direction, channel: usize, name: &'a str, gain: f64, ) -> impl Future<Output = Result<(), Error>> + MaybeSend + 'a
Set a named gain element in dB.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".