pub struct UsageGainReporterSynchronousProxy { /* private fields */ }
Implementations§
Source§impl UsageGainReporterSynchronousProxy
impl UsageGainReporterSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<UsageGainReporterEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<UsageGainReporterEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn register_listener(
&self,
device_unique_id: &str,
usage: &Usage,
usage_gain_listener: ClientEnd<UsageGainListenerMarker>,
) -> Result<(), Error>
pub fn register_listener( &self, device_unique_id: &str, usage: &Usage, usage_gain_listener: ClientEnd<UsageGainListenerMarker>, ) -> Result<(), Error>
Connects a listener to a stream of usage gain setting changes
for usage
on the device identified by device_token
. Usage
Gain is not set directly by any client; it is a translation of
the usage volume setting for each device, summed with active
muting/ducking gain adjustments.
Devices may map the same volume level to different dbfs, so
a device_unique_id
is needed to identify the device.
AudioDeviceEnumerator
provides programmatic access to devices
and their unique ids if it is necessary for a client to select
an id at runtime.
Trait Implementations§
Source§impl SynchronousProxy for UsageGainReporterSynchronousProxy
impl SynchronousProxy for UsageGainReporterSynchronousProxy
Source§type Proxy = UsageGainReporterProxy
type Proxy = UsageGainReporterProxy
The async proxy for the same protocol.
Source§type Protocol = UsageGainReporterMarker
type Protocol = UsageGainReporterMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for UsageGainReporterSynchronousProxy
impl RefUnwindSafe for UsageGainReporterSynchronousProxy
impl Send for UsageGainReporterSynchronousProxy
impl Sync for UsageGainReporterSynchronousProxy
impl Unpin for UsageGainReporterSynchronousProxy
impl UnwindSafe for UsageGainReporterSynchronousProxy
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