pub struct LocalServiceSynchronousProxy { /* private fields */ }
Implementations§
Source§impl LocalServiceSynchronousProxy
impl LocalServiceSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<LocalServiceEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<LocalServiceEvent, 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 remove_service(&self) -> Result<(), Error>
pub fn remove_service(&self) -> Result<(), Error>
Removes the service that this interface instance corresponds to. Does nothing if the service is already removed.
Sourcepub fn notify_value(
&self,
characteristic_id: u64,
peer_id: &str,
value: &[u8],
confirm: bool,
) -> Result<(), Error>
pub fn notify_value( &self, characteristic_id: u64, peer_id: &str, value: &[u8], confirm: bool, ) -> Result<(), Error>
Sends a notification carrying the value
of the characteristic with the
given characteristic_id
to the device with peer_id
.
If confirm
is true, then this method sends an indication instead. If the
peer fails to confirm the indication, the link between the peer and the
local adapter will be closed.
This method has no effect if the peer has not enabled notifications or indications on the requested characteristic.
Trait Implementations§
Source§impl Debug for LocalServiceSynchronousProxy
impl Debug for LocalServiceSynchronousProxy
Source§impl SynchronousProxy for LocalServiceSynchronousProxy
impl SynchronousProxy for LocalServiceSynchronousProxy
Source§type Proxy = LocalServiceProxy
type Proxy = LocalServiceProxy
The async proxy for the same protocol.
Source§type Protocol = LocalServiceMarker
type Protocol = LocalServiceMarker
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 LocalServiceSynchronousProxy
impl RefUnwindSafe for LocalServiceSynchronousProxy
impl Send for LocalServiceSynchronousProxy
impl Sync for LocalServiceSynchronousProxy
impl Unpin for LocalServiceSynchronousProxy
impl UnwindSafe for LocalServiceSynchronousProxy
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