Trait qiniu_http_client::prelude::EndpointsProvider  
source · [−]pub trait EndpointsProvider: DynClone + Debug + Send + Sync {
    fn get_endpoints<'e>(
        &'e self,
        options: GetOptions<'_>
    ) -> ApiResult<Cow<'e, Endpoints>>;
    fn async_get_endpoints<'a>(
        &'a self,
        options: GetOptions<'a>
    ) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>> { ... }
}Expand description
终端地址列表获取接口
同时提供阻塞获取接口和异步获取接口,异步获取接口则需要启用 async 功能
Required Methods
fn get_endpoints<'e>(
    &'e self,
    options: GetOptions<'_>
) -> ApiResult<Cow<'e, Endpoints>>
fn get_endpoints<'e>(
    &'e self,
    options: GetOptions<'_>
) -> ApiResult<Cow<'e, Endpoints>>
获取终端地址列表
该方法的异步版本为 Self::async_get_endpoints。
Provided Methods
fn async_get_endpoints<'a>(
    &'a self,
    options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>>
fn async_get_endpoints<'a>(
    &'a self,
    options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>>
Available on crate feature 
async only.异步获取终端地址列表
Trait Implementations
sourceimpl<'clone> Clone for Box<dyn EndpointsProvider + 'clone>
 
impl<'clone> Clone for Box<dyn EndpointsProvider + 'clone>
sourceimpl<'clone> Clone for Box<dyn EndpointsProvider + Send + 'clone>
 
impl<'clone> Clone for Box<dyn EndpointsProvider + Send + 'clone>
Implementations on Foreign Types
sourceimpl<'b, T: 'b + EndpointsProvider + ?Sized> EndpointsProvider for &'b T where
    &'b T: DynClone + Debug + Send + Sync, 
 
impl<'b, T: 'b + EndpointsProvider + ?Sized> EndpointsProvider for &'b T where
    &'b T: DynClone + Debug + Send + Sync, 
fn get_endpoints<'e>(
    &'e self,
    options: GetOptions<'_>
) -> ApiResult<Cow<'e, Endpoints>>
sourcefn async_get_endpoints<'a>(
    &'a self,
    options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>>
 
fn async_get_endpoints<'a>(
    &'a self,
    options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>>
Available on crate feature 
async only.sourceimpl<'b, T: 'b + EndpointsProvider + ?Sized> EndpointsProvider for &'b mut T where
    &'b mut T: DynClone + Debug + Send + Sync, 
 
impl<'b, T: 'b + EndpointsProvider + ?Sized> EndpointsProvider for &'b mut T where
    &'b mut T: DynClone + Debug + Send + Sync, 
fn get_endpoints<'e>(
    &'e self,
    options: GetOptions<'_>
) -> ApiResult<Cow<'e, Endpoints>>
sourcefn async_get_endpoints<'a>(
    &'a self,
    options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>>
 
fn async_get_endpoints<'a>(
    &'a self,
    options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>>
Available on crate feature 
async only.sourceimpl<T: EndpointsProvider + ?Sized> EndpointsProvider for Box<T> where
    Box<T>: DynClone + Debug + Send + Sync, 
 
impl<T: EndpointsProvider + ?Sized> EndpointsProvider for Box<T> where
    Box<T>: DynClone + Debug + Send + Sync, 
fn get_endpoints<'e>(
    &'e self,
    options: GetOptions<'_>
) -> ApiResult<Cow<'e, Endpoints>>
sourcefn async_get_endpoints<'a>(
    &'a self,
    options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>>
 
fn async_get_endpoints<'a>(
    &'a self,
    options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>>
Available on crate feature 
async only.sourceimpl<T: EndpointsProvider + ?Sized> EndpointsProvider for Rc<T> where
    Rc<T>: DynClone + Debug + Send + Sync, 
 
impl<T: EndpointsProvider + ?Sized> EndpointsProvider for Rc<T> where
    Rc<T>: DynClone + Debug + Send + Sync, 
fn get_endpoints<'e>(
    &'e self,
    options: GetOptions<'_>
) -> ApiResult<Cow<'e, Endpoints>>
sourcefn async_get_endpoints<'a>(
    &'a self,
    options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>>
 
fn async_get_endpoints<'a>(
    &'a self,
    options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>>
Available on crate feature 
async only.sourceimpl<T: EndpointsProvider + ?Sized> EndpointsProvider for Arc<T> where
    Arc<T>: DynClone + Debug + Send + Sync, 
 
impl<T: EndpointsProvider + ?Sized> EndpointsProvider for Arc<T> where
    Arc<T>: DynClone + Debug + Send + Sync, 
fn get_endpoints<'e>(
    &'e self,
    options: GetOptions<'_>
) -> ApiResult<Cow<'e, Endpoints>>
sourcefn async_get_endpoints<'a>(
    &'a self,
    options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>>
 
fn async_get_endpoints<'a>(
    &'a self,
    options: GetOptions<'a>
) -> Pin<Box<dyn Future<Output = ApiResult<Cow<'a, Endpoints>>> + Send + 'a>>
Available on crate feature 
async only.