pub struct ServiceInstancePublisherSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ServiceInstancePublisherSynchronousProxy
impl ServiceInstancePublisherSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ServiceInstancePublisherEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ServiceInstancePublisherEvent, 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 publish_service_instance(
&self,
service: &str,
instance: &str,
options: &ServiceInstancePublicationOptions,
publication_responder: ClientEnd<ServiceInstancePublicationResponder_Marker>,
___deadline: MonotonicInstant,
) -> Result<ServiceInstancePublisherPublishServiceInstanceResult, Error>
pub fn publish_service_instance( &self, service: &str, instance: &str, options: &ServiceInstancePublicationOptions, publication_responder: ClientEnd<ServiceInstancePublicationResponder_Marker>, ___deadline: MonotonicInstant, ) -> Result<ServiceInstancePublisherPublishServiceInstanceResult, Error>
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.
Trait Implementations§
Source§impl SynchronousProxy for ServiceInstancePublisherSynchronousProxy
impl SynchronousProxy for ServiceInstancePublisherSynchronousProxy
Source§type Proxy = ServiceInstancePublisherProxy
type Proxy = ServiceInstancePublisherProxy
The async proxy for the same protocol.
Source§type Protocol = ServiceInstancePublisherMarker
type Protocol = ServiceInstancePublisherMarker
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 ServiceInstancePublisherSynchronousProxy
impl RefUnwindSafe for ServiceInstancePublisherSynchronousProxy
impl Send for ServiceInstancePublisherSynchronousProxy
impl Sync for ServiceInstancePublisherSynchronousProxy
impl Unpin for ServiceInstancePublisherSynchronousProxy
impl UnwindSafe for ServiceInstancePublisherSynchronousProxy
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