pub enum ServiceInstancePublisherRequest {
PublishServiceInstance {
service: String,
instance: String,
options: ServiceInstancePublicationOptions,
publication_responder: ClientEnd<ServiceInstancePublicationResponder_Marker>,
responder: ServiceInstancePublisherPublishServiceInstanceResponder,
},
}
Expand description
Discoverable protocol for publishing service instances.
Variants§
PublishServiceInstance
Publishes a service instance. publication_responder
is consulted via its
OnPublication
method for initial announcements and to answer queries.
The service is published until the publication_responder
channel closes. In
addition to announcements and queries for the service type, all queries
for subtypes are answered subject to filtering through the responder.
- request
service
name of the type of service to be published. For example, cast uses ‘_googlecast._tcp.’. - request
instance
name of the instance to be published. This is often a descriptive name such asOffice Printer
or a name containing a large random number. - request
options
options to be applied to the publication. - request
publication_responder
client end of theServiceInstancePublicationResponder
channel consulted when formulating service instance announcements and query responses.
- error reason the requested operation failed.
If a service with the same service and instance names is already published, the old publication will be terminated, and the responder channel for the old publication will be closed.
Fields
§
options: ServiceInstancePublicationOptions
§
publication_responder: ClientEnd<ServiceInstancePublicationResponder_Marker>
Implementations§
Source§impl ServiceInstancePublisherRequest
impl ServiceInstancePublisherRequest
pub fn into_publish_service_instance( self, ) -> Option<(String, String, ServiceInstancePublicationOptions, ClientEnd<ServiceInstancePublicationResponder_Marker>, ServiceInstancePublisherPublishServiceInstanceResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServiceInstancePublisherRequest
impl !RefUnwindSafe for ServiceInstancePublisherRequest
impl Send for ServiceInstancePublisherRequest
impl Sync for ServiceInstancePublisherRequest
impl Unpin for ServiceInstancePublisherRequest
impl !UnwindSafe for ServiceInstancePublisherRequest
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