pub struct SearchResultsSynchronousProxy { /* private fields */ }
Implementations§
Source§impl SearchResultsSynchronousProxy
impl SearchResultsSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<SearchResultsEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<SearchResultsEvent, 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>
Called when a search this client added finds a matching service on a peer.
peer_id
is the peer the service was found on.
protocol
includes the ProtocolDescriptorList in the service record if it exists
(it is also included in attributes
.)
attributes
contains all attributes requested from the search that are present on the
peer record. It may also include additional attributes.
Each ServiceFound call should be acknowledged by replying.
A limited amount of unacknowledged results will be sent on the channel. Results may be
dropped if results are received while too many results are unacknowledged.
Trait Implementations§
Source§impl SynchronousProxy for SearchResultsSynchronousProxy
impl SynchronousProxy for SearchResultsSynchronousProxy
Source§type Proxy = SearchResultsProxy
type Proxy = SearchResultsProxy
The async proxy for the same protocol.
Source§type Protocol = SearchResultsMarker
type Protocol = SearchResultsMarker
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 SearchResultsSynchronousProxy
impl RefUnwindSafe for SearchResultsSynchronousProxy
impl Send for SearchResultsSynchronousProxy
impl Sync for SearchResultsSynchronousProxy
impl Unpin for SearchResultsSynchronousProxy
impl UnwindSafe for SearchResultsSynchronousProxy
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