pub trait EndpointsProvider: DynClone + Debug + Send + Sync {
fn get_endpoints(
&'e self,
options: GetOptions<'_>
) -> Result<Cow<'e, Endpoints>, Error>;
fn async_get_endpoints(
&'a self,
options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = Result<Cow<'a, Endpoints>, Error>> + Send + 'a, Global>> { ... }
}
Expand description
终端地址列表获取接口
同时提供阻塞获取接口和异步获取接口,异步获取接口则需要启用 async
功能
Required methods
fn get_endpoints(
&'e self,
options: GetOptions<'_>
) -> Result<Cow<'e, Endpoints>, Error>
fn get_endpoints(
&'e self,
options: GetOptions<'_>
) -> Result<Cow<'e, Endpoints>, Error>
获取终端地址列表