pub enum ServiceSubscriberRequest {
OnInstanceDiscovered {
instance: ServiceInstance,
responder: ServiceSubscriberOnInstanceDiscoveredResponder,
},
OnInstanceChanged {
instance: ServiceInstance,
responder: ServiceSubscriberOnInstanceChangedResponder,
},
OnInstanceLost {
service: String,
instance: String,
responder: ServiceSubscriberOnInstanceLostResponder,
},
OnQuery {
resource_type: ResourceType,
responder: ServiceSubscriberOnQueryResponder,
},
}
Expand description
Client-implemented interface for subscribers. Method replies are used to throttle traffic. The service won’t necessarily wait for a reply before calling another method.
Variants§
OnInstanceDiscovered
Notifies the subscriber that a service instance has been discovered.
OnInstanceChanged
Notifies the subscriber that addresses or text for a known service instance have changed.
OnInstanceLost
Notifies the subscriber that a known service instance has been lost.
OnQuery
Notifies the subscriber that a PTR query has been sent.
Implementations§
Source§impl ServiceSubscriberRequest
impl ServiceSubscriberRequest
pub fn into_on_instance_discovered( self, ) -> Option<(ServiceInstance, ServiceSubscriberOnInstanceDiscoveredResponder)>
pub fn into_on_instance_changed( self, ) -> Option<(ServiceInstance, ServiceSubscriberOnInstanceChangedResponder)>
pub fn into_on_instance_lost( self, ) -> Option<(String, String, ServiceSubscriberOnInstanceLostResponder)>
pub fn into_on_query( self, ) -> Option<(ResourceType, ServiceSubscriberOnQueryResponder)>
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 ServiceSubscriberRequest
impl !RefUnwindSafe for ServiceSubscriberRequest
impl Send for ServiceSubscriberRequest
impl Sync for ServiceSubscriberRequest
impl Unpin for ServiceSubscriberRequest
impl !UnwindSafe for ServiceSubscriberRequest
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