pub struct HfpTestSynchronousProxy { /* private fields */ }
Implementations§
source§impl HfpTestSynchronousProxy
impl HfpTestSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<HfpTestEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<HfpTestEvent, 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 battery_indicator(&self, level: u8) -> Result<(), Error>
pub fn battery_indicator(&self, level: u8) -> Result<(), Error>
Set the value of the AG battery indicator.
level
must be within the range 0-5 inclusive. Values outside of this
range cause the channel to close.
sourcepub fn set_connection_behavior(
&self,
behavior: ConnectionBehavior
) -> Result<(), Error>
pub fn set_connection_behavior( &self, behavior: ConnectionBehavior ) -> Result<(), Error>
Configure the connection behavior when the component discovers new peers.