pub struct ClientProxy { /* private fields */ }Implementations§
Source§impl ClientProxy
 
impl ClientProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
 
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.bluetooth.gatt2/Client.
Sourcepub fn take_event_stream(&self) -> ClientEventStream
 
pub fn take_event_stream(&self) -> ClientEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn watch_services(
    &self,
    uuids: &[Uuid],
) -> QueryResponseFut<(Vec<ServiceInfo>, Vec<Handle>), DefaultFuchsiaResourceDialect>
 
pub fn watch_services( &self, uuids: &[Uuid], ) -> QueryResponseFut<(Vec<ServiceInfo>, Vec<Handle>), DefaultFuchsiaResourceDialect>
Enumerates services found on the peer that this Client represents.
Results can be filtered by specifying a list of UUIDs in uuids. This
method follows the hanging get pattern. On the initial request, a
complete snapshot will be returned. Subsequent calls with the same set
of uuids receive a response only when one or more services have been
added, modified, or removed from the entries reported since the most
recent call. Calls with new values of uuids will reset the filter and
receive a complete snapshot.
Handles may be reused across services, so a handle may be in both
updated and removed. For this reason, it is recommended to process
removed services before updated services.
To further interact with services, clients must obtain a RemoteService protocol by calling ConnectToService().
- request 
uuidsthe UUID allowlist. If empty, all services will be returned. 
- response 
updatedthe services that have been added or modified since WatchServices() was last called. The returned ServiceInfo tables will contain only basic information about each service and thecharacteristicsandincludesfields will be null. If a service has been added/modified and then removed since the last call, it will only be present inremoved, notupdated. If concluded due to a new call with a newuuidsvalue,updatedwill be empty. - response 
removedthe handles of the services that have been removed since the last call to WatchServices(). 
Sourcepub fn connect_to_service(
    &self,
    handle: &ServiceHandle,
    service: ServerEnd<RemoteServiceMarker>,
) -> Result<(), Error>
 
pub fn connect_to_service( &self, handle: &ServiceHandle, service: ServerEnd<RemoteServiceMarker>, ) -> Result<(), Error>
Connects the RemoteService with the given identifier. Only 1 connection per service is allowed.
service will be closed on error, with an epitaph that provides a
reason.
- error Returns a 
ZX_ERR_INVALID_ARGSifhandleis invalid. - error Returns a 
ZX_ERR_NOT_FOUNDif the service is not found. - error Returns a 
ZX_ERR_CONNECTION_RESETif the service is removed. - error Returns a 
ZX_ERR_NOT_CONNECTEDif the peer disconnects. - error Returns a 
ZX_ERR_ALREADY_EXISTSif the service is already connected. 
Trait Implementations§
Source§impl ClientProxyInterface for ClientProxy
 
impl ClientProxyInterface for ClientProxy
type WatchServicesResponseFut = QueryResponseFut<(Vec<ServiceInfo>, Vec<Handle>)>
fn watch_services(&self, uuids: &[Uuid]) -> Self::WatchServicesResponseFut
fn connect_to_service( &self, handle: &ServiceHandle, service: ServerEnd<RemoteServiceMarker>, ) -> Result<(), Error>
Source§impl Clone for ClientProxy
 
impl Clone for ClientProxy
Source§fn clone(&self) -> ClientProxy
 
fn clone(&self) -> ClientProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientProxy
 
impl Debug for ClientProxy
Source§impl Proxy for ClientProxy
 
impl Proxy for ClientProxy
Source§type Protocol = ClientMarker
 
type Protocol = ClientMarker
Proxy controls.