pub struct HeadsetGainProxy { /* private fields */ }
Implementations§
Source§impl HeadsetGainProxy
impl HeadsetGainProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.bluetooth.hfp/HeadsetGain.
Sourcepub fn take_event_stream(&self) -> HeadsetGainEventStream
pub fn take_event_stream(&self) -> HeadsetGainEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn set_speaker_gain(&self, requested: u8) -> Result<(), Error>
pub fn set_speaker_gain(&self, requested: u8) -> Result<(), Error>
Make a request to the headset to set the speaker gain to requested
.
requested
must be in the range [0-15] inclusive. Any values outside of
this range will result in the channel closing with a
ZX_ERR_INVALID_ARGUMENT
epitaph.
Sourcepub fn watch_speaker_gain(
&self,
) -> QueryResponseFut<u8, DefaultFuchsiaResourceDialect>
pub fn watch_speaker_gain( &self, ) -> QueryResponseFut<u8, DefaultFuchsiaResourceDialect>
Hanging get to watch for updates to the headset speaker gain. Responses represent the current gain value that is set.
The returned gain
value will always be in the range [0-15] inclusive.
Sourcepub fn set_microphone_gain(&self, requested: u8) -> Result<(), Error>
pub fn set_microphone_gain(&self, requested: u8) -> Result<(), Error>
Make a request to the Headset to set the microphone gain to requested
.
requested
must be in the range [0-15] inclusive. Any values outside of
this range will result in the channel closing with a
ZX_ERR_INVALID_ARGUMENT
epitaph.
Sourcepub fn watch_microphone_gain(
&self,
) -> QueryResponseFut<u8, DefaultFuchsiaResourceDialect>
pub fn watch_microphone_gain( &self, ) -> QueryResponseFut<u8, DefaultFuchsiaResourceDialect>
Hanging get to watch for updates to the headset microphone gain. Responses represent the current gain value that is set.
The returned gain
value will always be in the range [0-15] inclusive.
Trait Implementations§
Source§impl Clone for HeadsetGainProxy
impl Clone for HeadsetGainProxy
Source§fn clone(&self) -> HeadsetGainProxy
fn clone(&self) -> HeadsetGainProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for HeadsetGainProxy
impl Debug for HeadsetGainProxy
Source§impl HeadsetGainProxyInterface for HeadsetGainProxy
impl HeadsetGainProxyInterface for HeadsetGainProxy
type WatchSpeakerGainResponseFut = QueryResponseFut<u8>
type WatchMicrophoneGainResponseFut = QueryResponseFut<u8>
fn set_speaker_gain(&self, requested: u8) -> Result<(), Error>
fn watch_speaker_gain(&self) -> Self::WatchSpeakerGainResponseFut
fn set_microphone_gain(&self, requested: u8) -> Result<(), Error>
fn watch_microphone_gain(&self) -> Self::WatchMicrophoneGainResponseFut
Source§impl Proxy for HeadsetGainProxy
impl Proxy for HeadsetGainProxy
Source§type Protocol = HeadsetGainMarker
type Protocol = HeadsetGainMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for HeadsetGainProxy
impl !RefUnwindSafe for HeadsetGainProxy
impl Send for HeadsetGainProxy
impl Sync for HeadsetGainProxy
impl Unpin for HeadsetGainProxy
impl !UnwindSafe for HeadsetGainProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)