pub struct ServiceSubscriber2SynchronousProxy { /* private fields */ }
Implementations§
Source§impl ServiceSubscriber2SynchronousProxy
impl ServiceSubscriber2SynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ServiceSubscriber2Event, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ServiceSubscriber2Event, 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 subscribe_to_service(
&self,
service: &str,
options: &ServiceSubscriptionOptions,
listener: ClientEnd<ServiceSubscriptionListenerMarker>,
) -> Result<(), Error>
pub fn subscribe_to_service( &self, service: &str, options: &ServiceSubscriptionOptions, listener: ClientEnd<ServiceSubscriptionListenerMarker>, ) -> Result<(), Error>
Subscribes to a service. The subscription lasts until subscriber
is unbound.
- request
service
name of the type of service to which to subscribe. For example, cast uses ‘_googlecast._tcp.’. If this value is not a valid service name,subscriber
is closed immediately and an error message is logged. - request
options
options to be applied to the subscription. - request
listener
client end of theServiceSubscriptionListener
channel.
Sourcepub fn subscribe_to_all_services(
&self,
options: &ServiceSubscriptionOptions,
listener: ClientEnd<ServiceSubscriptionListenerMarker>,
) -> Result<(), Error>
pub fn subscribe_to_all_services( &self, options: &ServiceSubscriptionOptions, listener: ClientEnd<ServiceSubscriptionListenerMarker>, ) -> Result<(), Error>
Subscribes to all services. The subscription lasts until subscriber
is unbound.
- request
options
options to be applied to the subscription. - request
listener
client end of theServiceSubscriptionListener
channel.
Trait Implementations§
Source§impl SynchronousProxy for ServiceSubscriber2SynchronousProxy
impl SynchronousProxy for ServiceSubscriber2SynchronousProxy
Source§type Proxy = ServiceSubscriber2Proxy
type Proxy = ServiceSubscriber2Proxy
The async proxy for the same protocol.
Source§type Protocol = ServiceSubscriber2Marker
type Protocol = ServiceSubscriber2Marker
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 ServiceSubscriber2SynchronousProxy
impl RefUnwindSafe for ServiceSubscriber2SynchronousProxy
impl Send for ServiceSubscriber2SynchronousProxy
impl Sync for ServiceSubscriber2SynchronousProxy
impl Unpin for ServiceSubscriber2SynchronousProxy
impl UnwindSafe for ServiceSubscriber2SynchronousProxy
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