pub struct FuchsiaTypes {}Trait Implementations§
Source§impl Central<FuchsiaTypes> for Central
impl Central<FuchsiaTypes> for Central
Source§fn scan(&self, filters: &[ScanFilter]) -> ScanResultStream
fn scan(&self, filters: &[ScanFilter]) -> ScanResultStream
Scan for peers.
If any of the filters match, the results will be returned in the Stream.
Source§fn periodic_advertising(
&self,
) -> Result<<FuchsiaTypes as GattTypes>::PeriodicAdvertising>
fn periodic_advertising( &self, ) -> Result<<FuchsiaTypes as GattTypes>::PeriodicAdvertising>
Get API for periodic advertising.
Source§fn connect(&self, peer_id: PeerId) -> <FuchsiaTypes as GattTypes>::ConnectFuture
fn connect(&self, peer_id: PeerId) -> <FuchsiaTypes as GattTypes>::ConnectFuture
Connect to a specific peer.
Source§impl Client<FuchsiaTypes> for Client
impl Client<FuchsiaTypes> for Client
Source§fn find_service(
&self,
uuid: Uuid,
) -> <FuchsiaTypes as GattTypes>::FindServicesFut
fn find_service( &self, uuid: Uuid, ) -> <FuchsiaTypes as GattTypes>::FindServicesFut
Find services by UUID on the peer.
This may cause as much as a full discovery of all services on the peer
if the stack deems it appropriate.
Service information should be up to date at the time returned.
Source§impl GattTypes for FuchsiaTypes
impl GattTypes for FuchsiaTypes
type Central = Central
type ScanResultStream = ScanResultStream
type Client = Client
type ConnectFuture = Ready<Result<<FuchsiaTypes as GattTypes>::Client, Error>>
Source§type PeriodicAdvertising = PeriodicAdvertising
type PeriodicAdvertising = PeriodicAdvertising
The implementation of periodic advertising for this GATT implementation.
type PeerServiceHandle = PeerServiceHandle
type FindServicesFut = Task<Result<Vec<PeerServiceHandle>, Error>>
type PeerService = PeerService
type ServiceConnectFut = Ready<Result<PeerService, Error>>
Source§type ReadFut<'a> = ReadFuture<'a>
type ReadFut<'a> = ReadFuture<'a>
Future resolving when a characteristic or descriptor has been read.
Resolves to a number of bytes read along with a boolean indicating if
the value was possibly truncated, or an Error if the value could not
be read.
Source§type WriteFut<'a> = WriteFuture<'a>
type WriteFut<'a> = WriteFuture<'a>
Future resolving when a characteristic or descriptor has been written.
Returns an error if the value could not be written.
Source§type CharacteristicDiscoveryFut = CharacteristicResultFut
type CharacteristicDiscoveryFut = CharacteristicResultFut
Future returned by PeerService::discover_characteristics,
delivering the set of characteristics discovered within a service
Source§type NotificationStream = CharacteristicNotificationStream
type NotificationStream = CharacteristicNotificationStream
A stream of notifications, delivering updates to a characteristic value
that has been subscribed to. See
client::PeerService::subscribeSource§impl LocalService<FuchsiaTypes> for LocalService
impl LocalService<FuchsiaTypes> for LocalService
Source§fn publish(&self) -> <FuchsiaTypes as ServerTypes>::ServiceEventStream
fn publish(&self) -> <FuchsiaTypes as ServerTypes>::ServiceEventStream
Publish the service.
Returns an EventStream providing Events to be processed by the local
service implementation.
Events will only be delivered to one ServiceEventStream at a time.
Calling publish while a previous ServiceEventStream is still active
will return a stream with only Err(AlreadyPublished).
Source§fn notify(&self, characteristic: &Handle, data: &[u8], peers: &[PeerId])
fn notify(&self, characteristic: &Handle, data: &[u8], peers: &[PeerId])
Notify a characteristic.
Leave
peers empty to notify all peers who have configured
notifications. Peers that have not configured for notifications will
not be notified.Source§fn indicate(
&self,
characteristic: &Handle,
data: &[u8],
peers: &[PeerId],
) -> <FuchsiaTypes as ServerTypes>::IndicateConfirmationStream
fn indicate( &self, characteristic: &Handle, data: &[u8], peers: &[PeerId], ) -> <FuchsiaTypes as ServerTypes>::IndicateConfirmationStream
Indicate on a characteristic.
Leave
peers empty to notify all peers who have configured
indications. Peers that have not configured for indications will
be skipped. Returns a stream which has items for each peer that
confirms the notification, and terminates when all peers have either
timed out or confirmed.Source§impl PeerService<FuchsiaTypes> for PeerService
impl PeerService<FuchsiaTypes> for PeerService
Source§fn discover_characteristics(
&self,
uuid: Option<Uuid>,
) -> CharacteristicResultFut ⓘ
fn discover_characteristics( &self, uuid: Option<Uuid>, ) -> CharacteristicResultFut ⓘ
Discover characteristics on this service.
If
uuid is provided, only the characteristics matching uuid will be
returned. This operation may use either the Discovery All
Characteristics of a Service or Discovery Characteristic by UUID
procedures, regardless of uuid.Source§fn read_characteristic<'a>(
&self,
handle: &Handle,
offset: u16,
buf: &'a mut [u8],
) -> <FuchsiaTypes as GattTypes>::ReadFut<'a>
fn read_characteristic<'a>( &self, handle: &Handle, offset: u16, buf: &'a mut [u8], ) -> <FuchsiaTypes as GattTypes>::ReadFut<'a>
Read a characteristic into a buffer, given the handle within the
service. On success, returns the size read and whether the value may
have been truncated. By default this will try to use a long read if
the
buf is larger than a normal read will allow (22 bytes) or if
the offset is non-zero.fn write_characteristic<'a>( &self, handle: &Handle, mode: WriteMode, offset: u16, buf: &'a [u8], ) -> <FuchsiaTypes as GattTypes>::WriteFut<'a>
fn read_descriptor<'a>( &self, handle: &Handle, offset: u16, buf: &'a mut [u8], ) -> <FuchsiaTypes as GattTypes>::ReadFut<'a>
fn write_descriptor<'a>( &self, handle: &Handle, offset: u16, buf: &'a [u8], ) -> <FuchsiaTypes as GattTypes>::WriteFut<'a>
Source§fn subscribe(
&self,
handle: &Handle,
) -> <FuchsiaTypes as GattTypes>::NotificationStream
fn subscribe( &self, handle: &Handle, ) -> <FuchsiaTypes as GattTypes>::NotificationStream
Subscribe to updates on a Characteristic.
Either notifications or indications will be enabled depending on the
properties available, with indications preferred if they are
supported. Fails if the Characteristic doesn’t support indications
or notifications. Errors are delivered through an Err item in the
stream. This will often write to the Client Characteristic
Configuration descriptor for the Characteristic subscribed to.
Updates sent from the peer will be delivered to the Stream returned.
Source§impl PeerServiceHandle<FuchsiaTypes> for PeerServiceHandle
impl PeerServiceHandle<FuchsiaTypes> for PeerServiceHandle
fn uuid(&self) -> Uuid
fn is_primary(&self) -> bool
fn connect(&self) -> <FuchsiaTypes as GattTypes>::ServiceConnectFut
Source§impl Server<FuchsiaTypes> for Server
impl Server<FuchsiaTypes> for Server
Source§fn prepare(
&self,
service: ServiceDefinition,
) -> <FuchsiaTypes as ServerTypes>::LocalServiceFut
fn prepare( &self, service: ServiceDefinition, ) -> <FuchsiaTypes as ServerTypes>::LocalServiceFut
Prepare to publish a service.
This service is not immediately visible in the local GATT server.
It will be published when the LocalService::publish is called.
If the returned LocalService is dropped, the service will be removed
from the Server.
Source§impl ServerTypes for FuchsiaTypes
impl ServerTypes for FuchsiaTypes
type Server = Server
type LocalService = LocalService
type LocalServiceFut = LocalServiceFut
type ServiceEventStream = LocalEventStream
type ServiceWriteType = Vec<u8>
type ReadResponder = ReadResponder
type WriteResponder = WriteResponder
type IndicateConfirmationStream = IndicateConfirmationStream
Auto Trait Implementations§
impl Freeze for FuchsiaTypes
impl RefUnwindSafe for FuchsiaTypes
impl Send for FuchsiaTypes
impl Sync for FuchsiaTypes
impl Unpin for FuchsiaTypes
impl UnsafeUnpin for FuchsiaTypes
impl UnwindSafe for FuchsiaTypes
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more