pub struct AdvertisedPeripheralProxy { /* private fields */ }
Implementations§
Source§impl AdvertisedPeripheralProxy
impl AdvertisedPeripheralProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.bluetooth.le/AdvertisedPeripheral.
Sourcepub fn take_event_stream(&self) -> AdvertisedPeripheralEventStream
pub fn take_event_stream(&self) -> AdvertisedPeripheralEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn on_connected(
&self,
peer: &Peer,
connection: ClientEnd<ConnectionMarker>,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn on_connected( &self, peer: &Peer, connection: ClientEnd<ConnectionMarker>, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Called when a remote LE central connects to this peripheral when
connectable advertising is enabled via
[fuchsia.bluetooth.le/Peripheral.Advertise
]. When this call is made,
the system has paused advertising, and will not continue until it
receives a response.
The returned [fuchsia.bluetooth.le/Connection
] protocol can be used to
interact with the peer. It also represents a peripheral’s ownership over
the connection: the client can drop the protocol to request a
disconnection. Similarly, the protocol is closed by the system to
indicate that the connection to the peer has been lost.
- request
peer
Information about the central that initiated the connection. - request
connection
Represents the connection.
- response An empty response should be sent to acknowledge the connection and resume advertising (for flow control).
Trait Implementations§
Source§impl AdvertisedPeripheralProxyInterface for AdvertisedPeripheralProxy
impl AdvertisedPeripheralProxyInterface for AdvertisedPeripheralProxy
type OnConnectedResponseFut = QueryResponseFut<()>
fn on_connected( &self, peer: &Peer, connection: ClientEnd<ConnectionMarker>, ) -> Self::OnConnectedResponseFut
Source§impl Clone for AdvertisedPeripheralProxy
impl Clone for AdvertisedPeripheralProxy
Source§fn clone(&self) -> AdvertisedPeripheralProxy
fn clone(&self) -> AdvertisedPeripheralProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AdvertisedPeripheralProxy
impl Debug for AdvertisedPeripheralProxy
Source§impl Proxy for AdvertisedPeripheralProxy
impl Proxy for AdvertisedPeripheralProxy
Source§type Protocol = AdvertisedPeripheralMarker
type Protocol = AdvertisedPeripheralMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for AdvertisedPeripheralProxy
impl !RefUnwindSafe for AdvertisedPeripheralProxy
impl Send for AdvertisedPeripheralProxy
impl Sync for AdvertisedPeripheralProxy
impl Unpin for AdvertisedPeripheralProxy
impl !UnwindSafe for AdvertisedPeripheralProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)