pub struct PeerObserverSynchronousProxy { /* private fields */ }
Implementations§
Source§impl PeerObserverSynchronousProxy
impl PeerObserverSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<PeerObserverEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<PeerObserverEvent, 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 service_found(
&self,
peer_id: &PeerId,
protocol: Option<&[ProtocolDescriptor]>,
attributes: &[Attribute],
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn service_found( &self, peer_id: &PeerId, protocol: Option<&[ProtocolDescriptor]>, attributes: &[Attribute], ___deadline: MonotonicInstant, ) -> Result<(), Error>
The peer discovered the services of another peer in the piconet.
- request
peer_id
The peer the service was found on. - request
protocol
Includes the ProtocolDescriptorList in the service record. - request
attributes
Contains all attributes requested from the search that are present on the peer record.
Sourcepub fn peer_connected(
&self,
peer_id: &PeerId,
protocol: &[ProtocolDescriptor],
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn peer_connected( &self, peer_id: &PeerId, protocol: &[ProtocolDescriptor], ___deadline: MonotonicInstant, ) -> Result<(), Error>
Called when a peer has connected to a service.
- request
peer_id
The peer that connected to the service. - request
protocol
Contains the protocol list of the connection.
Trait Implementations§
Source§impl Debug for PeerObserverSynchronousProxy
impl Debug for PeerObserverSynchronousProxy
Source§impl SynchronousProxy for PeerObserverSynchronousProxy
impl SynchronousProxy for PeerObserverSynchronousProxy
Source§type Proxy = PeerObserverProxy
type Proxy = PeerObserverProxy
The async proxy for the same protocol.
Source§type Protocol = PeerObserverMarker
type Protocol = PeerObserverMarker
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 PeerObserverSynchronousProxy
impl RefUnwindSafe for PeerObserverSynchronousProxy
impl Send for PeerObserverSynchronousProxy
impl Sync for PeerObserverSynchronousProxy
impl Unpin for PeerObserverSynchronousProxy
impl UnwindSafe for PeerObserverSynchronousProxy
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