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.
Sourcepub fn on_write_value(
&self,
id: u64,
offset: u16,
value: &[u8],
___deadline: MonotonicInstant,
) -> Result<ErrorCode, Error>
pub fn on_write_value( &self, id: u64, offset: u16, value: &[u8], ___deadline: MonotonicInstant, ) -> Result<ErrorCode, Error>
Called when a remote device issues a request to write the value of the characteristic or descriptor with the given identifier.
Trait Implementations§
Source§impl From<LocalServiceDelegateSynchronousProxy> for Handle
impl From<LocalServiceDelegateSynchronousProxy> for Handle
Source§fn from(value: LocalServiceDelegateSynchronousProxy) -> Self
fn from(value: LocalServiceDelegateSynchronousProxy) -> Self
Source§impl FromClient for LocalServiceDelegateSynchronousProxy
impl FromClient for LocalServiceDelegateSynchronousProxy
Source§type Protocol = LocalServiceDelegateMarker
type Protocol = LocalServiceDelegateMarker
Source§fn from_client(value: ClientEnd<LocalServiceDelegateMarker>) -> Self
fn from_client(value: ClientEnd<LocalServiceDelegateMarker>) -> Self
Source§impl SynchronousProxy for LocalServiceDelegateSynchronousProxy
impl SynchronousProxy for LocalServiceDelegateSynchronousProxy
Source§type Proxy = LocalServiceDelegateProxy
type Proxy = LocalServiceDelegateProxy
Source§type Protocol = LocalServiceDelegateMarker
type Protocol = LocalServiceDelegateMarker
Proxy
controls.