pub enum SearchResultsRequest {
ServiceFound {
peer_id: PeerId,
protocol: Option<Vec<ProtocolDescriptor>>,
attributes: Vec<Attribute>,
responder: SearchResultsServiceFoundResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: SearchResultsControlHandle,
method_type: MethodType,
},
}
Expand description
Represents an active search which can produce results when peers are connected. Closing this protocol will result in the associated search not being performed on new connected peers.
Variants§
ServiceFound
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.
Fields
peer_id: PeerId
protocol: Option<Vec<ProtocolDescriptor>>
responder: SearchResultsServiceFoundResponder
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: SearchResultsControlHandle
method_type: MethodType
Implementations§
Source§impl SearchResultsRequest
impl SearchResultsRequest
pub fn into_service_found( self, ) -> Option<(PeerId, Option<Vec<ProtocolDescriptor>>, Vec<Attribute>, SearchResultsServiceFoundResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL