pub enum ServiceSubscriber2Request {
SubscribeToService {
service: String,
options: ServiceSubscriptionOptions,
listener: ClientEnd<ServiceSubscriptionListenerMarker>,
control_handle: ServiceSubscriber2ControlHandle,
},
SubscribeToAllServices {
options: ServiceSubscriptionOptions,
listener: ClientEnd<ServiceSubscriptionListenerMarker>,
control_handle: ServiceSubscriber2ControlHandle,
},
}
Expand description
Discoverable protocol for finding service instances.
Variants§
SubscribeToService
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.
Fields
§
options: ServiceSubscriptionOptions
§
listener: ClientEnd<ServiceSubscriptionListenerMarker>
§
control_handle: ServiceSubscriber2ControlHandle
SubscribeToAllServices
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.
Fields
§
options: ServiceSubscriptionOptions
§
listener: ClientEnd<ServiceSubscriptionListenerMarker>
§
control_handle: ServiceSubscriber2ControlHandle
Implementations§
Source§impl ServiceSubscriber2Request
impl ServiceSubscriber2Request
pub fn into_subscribe_to_service( self, ) -> Option<(String, ServiceSubscriptionOptions, ClientEnd<ServiceSubscriptionListenerMarker>, ServiceSubscriber2ControlHandle)>
pub fn into_subscribe_to_all_services( self, ) -> Option<(ServiceSubscriptionOptions, ClientEnd<ServiceSubscriptionListenerMarker>, ServiceSubscriber2ControlHandle)>
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 ServiceSubscriber2Request
impl !RefUnwindSafe for ServiceSubscriber2Request
impl Send for ServiceSubscriber2Request
impl Sync for ServiceSubscriber2Request
impl Unpin for ServiceSubscriber2Request
impl !UnwindSafe for ServiceSubscriber2Request
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