pub struct Server_SynchronousProxy { /* private fields */ }
Implementations§
Source§impl Server_SynchronousProxy
impl Server_SynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<Server_Event, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<Server_Event, 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 publish_service(
&self,
info: &ServiceInfo,
service: ClientEnd<LocalServiceMarker>,
___deadline: MonotonicInstant,
) -> Result<ServerPublishServiceResult, Error>
pub fn publish_service( &self, info: &ServiceInfo, service: ClientEnd<LocalServiceMarker>, ___deadline: MonotonicInstant, ) -> Result<ServerPublishServiceResult, Error>
Publishes the given service
so that it is available to all remote peers. Upon publication,
the service is defined to have INITIAL_VALUE_CHANGED_CREDITS credits available for sending
indications/notifications.
The caller must assign distinct handles to the characteristics and descriptors listed in
info
. These identifiers will be used in requests sent to service
.
- request
info
Defines the structure of the GATT service. Includes characteristics and descriptors that will be made available to peers, as well as the service handle, which is required to be unique across all services published to this Server. - request
service
Provides the implementation of the service per the documented behavior of aLocalService
.
- response An empty response indicates the service was successfully published.
- error See
gatt2.PublishServiceError
for possible failure modes.
Trait Implementations§
Source§impl Debug for Server_SynchronousProxy
impl Debug for Server_SynchronousProxy
Source§impl SynchronousProxy for Server_SynchronousProxy
impl SynchronousProxy for Server_SynchronousProxy
Source§type Proxy = Server_Proxy
type Proxy = Server_Proxy
The async proxy for the same protocol.
Source§type Protocol = Server_Marker
type Protocol = Server_Marker
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 Server_SynchronousProxy
impl RefUnwindSafe for Server_SynchronousProxy
impl Send for Server_SynchronousProxy
impl Sync for Server_SynchronousProxy
impl Unpin for Server_SynchronousProxy
impl UnwindSafe for Server_SynchronousProxy
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