pub struct LocalServiceDelegateSynchronousProxy { /* private fields */ }
Implementations§
Source§impl LocalServiceDelegateSynchronousProxy
impl LocalServiceDelegateSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<LocalServiceDelegateEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<LocalServiceDelegateEvent, 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 on_characteristic_configuration(
&self,
characteristic_id: u64,
peer_id: &str,
notify: bool,
indicate: bool,
) -> Result<(), Error>
pub fn on_characteristic_configuration( &self, characteristic_id: u64, peer_id: &str, notify: bool, indicate: bool, ) -> Result<(), Error>
Notifies the delegate when a remote device with peer_id
enables or
disables notifications or indications on the characteristic with the given
characteristic_id
.
Sourcepub fn on_read_value(
&self,
id: u64,
offset: i32,
___deadline: MonotonicInstant,
) -> Result<(Option<Vec<u8>>, ErrorCode), Error>
pub fn on_read_value( &self, id: u64, offset: i32, ___deadline: MonotonicInstant, ) -> Result<(Option<Vec<u8>>, ErrorCode), Error>
Called when a remote device issues a request to read the value of the
of the characteristic or descriptor with given identifier. The delegate
must respond to the request by returning the characteristic value. If the
read request resulted in an error it should be returned in error_code
.
On success, error_code
should be set to NO_ERROR and a value
should be
provided.
Trait Implementations§
Source§impl SynchronousProxy for LocalServiceDelegateSynchronousProxy
impl SynchronousProxy for LocalServiceDelegateSynchronousProxy
Source§type Proxy = LocalServiceDelegateProxy
type Proxy = LocalServiceDelegateProxy
The async proxy for the same protocol.
Source§type Protocol = LocalServiceDelegateMarker
type Protocol = LocalServiceDelegateMarker
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 LocalServiceDelegateSynchronousProxy
impl RefUnwindSafe for LocalServiceDelegateSynchronousProxy
impl Send for LocalServiceDelegateSynchronousProxy
impl Sync for LocalServiceDelegateSynchronousProxy
impl Unpin for LocalServiceDelegateSynchronousProxy
impl UnwindSafe for LocalServiceDelegateSynchronousProxy
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