ServiceDiscovery

Trait ServiceDiscovery 

Source
pub trait ServiceDiscovery: Send + Sync {
    // Required methods
    fn discover_services<'life0, 'life1, 'async_trait>(
        &'life0 self,
        filter: Option<&'life1 ServiceFilter>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceInfo>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_service_details<'life0, 'life1, 'async_trait>(
        &'life0 self,
        uri: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<ServiceDetails>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn check_service_availability<'life0, 'life1, 'async_trait>(
        &'life0 self,
        uri: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<AvailabilityStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_service_proto<'life0, 'life1, 'async_trait>(
        &'life0 self,
        uri: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ProtoFile>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

服务发现和网络交互

Required Methods§

Source

fn discover_services<'life0, 'life1, 'async_trait>( &'life0 self, filter: Option<&'life1 ServiceFilter>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

发现网络中的服务

Source

fn get_service_details<'life0, 'life1, 'async_trait>( &'life0 self, uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ServiceDetails>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取服务详细信息

Source

fn check_service_availability<'life0, 'life1, 'async_trait>( &'life0 self, uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<AvailabilityStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

检查服务可用性

Source

fn get_service_proto<'life0, 'life1, 'async_trait>( &'life0 self, uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<ProtoFile>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取服务Proto文件

Implementors§