Skip to main content

FuchsiaTypes

Struct FuchsiaTypes 

Source
pub struct FuchsiaTypes {}

Trait Implementations§

Source§

impl Central<FuchsiaTypes> for Central

Source§

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>

Get API for periodic advertising.
Source§

fn connect(&self, peer_id: PeerId) -> <FuchsiaTypes as GattTypes>::ConnectFuture

Connect to a specific peer.
Source§

impl Client<FuchsiaTypes> for Client

Source§

fn peer_id(&self) -> PeerId

The ID of the peer this is connected to.
Source§

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

Source§

type Central = Central

Source§

type ScanResultStream = ScanResultStream

Source§

type Client = Client

Source§

type ConnectFuture = Ready<Result<<FuchsiaTypes as GattTypes>::Client, Error>>

Source§

type PeriodicAdvertising = PeriodicAdvertising

The implementation of periodic advertising for this GATT implementation.
Source§

type PeerServiceHandle = PeerServiceHandle

Source§

type FindServicesFut = Task<Result<Vec<PeerServiceHandle>, Error>>

Source§

type PeerService = PeerService

Source§

type ServiceConnectFut = Ready<Result<PeerService, Error>>

Source§

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>

Future resolving when a characteristic or descriptor has been written. Returns an error if the value could not be written.
Source§

type CharacteristicDiscoveryFut = CharacteristicResultFut

Future returned by PeerService::discover_characteristics, delivering the set of characteristics discovered within a service
Source§

type NotificationStream = CharacteristicNotificationStream

A stream of notifications, delivering updates to a characteristic value that has been subscribed to. See client::PeerService::subscribe
Source§

impl LocalService<FuchsiaTypes> for LocalService

Source§

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])

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

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

Source§

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>

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.
Source§

fn write_characteristic<'a>( &self, handle: &Handle, mode: WriteMode, offset: u16, buf: &'a [u8], ) -> <FuchsiaTypes as GattTypes>::WriteFut<'a>

Source§

fn read_descriptor<'a>( &self, handle: &Handle, offset: u16, buf: &'a mut [u8], ) -> <FuchsiaTypes as GattTypes>::ReadFut<'a>

Source§

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

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

Source§

impl Server<FuchsiaTypes> for Server

Source§

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

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V