pub trait RegionsProvider:
DynClone
+ Debug
+ Sync
+ Send {
// Required method
fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>;
// Provided methods
fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions> { ... }
fn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>> { ... }
fn async_get_all(
&self,
opts: GetOptions,
) -> BoxFuture<'_, ApiResult<GotRegions>> { ... }
}
Expand description
区域信息获取接口
可以获取一个区域也可以获取多个区域
同时提供阻塞获取接口和异步获取接口,异步获取接口则需要启用 async
功能
Required Methods§
Sourcefn get(&self, opts: GetOptions) -> ApiResult<GotRegion>
fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>
返回七牛区域信息
该方法的异步版本为 Self::async_get
。
Provided Methods§
Sourcefn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>
fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>
返回多个七牛区域信息
该方法的异步版本为 Self::async_get_all
。
Sourcefn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>>
Available on crate feature async
only.
fn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>>
async
only.异步返回七牛区域信息
Sourcefn async_get_all(
&self,
opts: GetOptions,
) -> BoxFuture<'_, ApiResult<GotRegions>>
Available on crate feature async
only.
fn async_get_all( &self, opts: GetOptions, ) -> BoxFuture<'_, ApiResult<GotRegions>>
async
only.异步返回多个七牛区域信息
Implementations on Foreign Types§
Source§impl<'a, T: 'a + RegionsProvider + ?Sized> RegionsProvider for &'a T
impl<'a, T: 'a + RegionsProvider + ?Sized> RegionsProvider for &'a T
fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>
fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>
Source§fn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>>
fn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>>
Available on crate feature
async
only.Source§fn async_get_all(
&self,
opts: GetOptions,
) -> BoxFuture<'_, ApiResult<GotRegions>>
fn async_get_all( &self, opts: GetOptions, ) -> BoxFuture<'_, ApiResult<GotRegions>>
Available on crate feature
async
only.Source§impl<'a, T: 'a + RegionsProvider + ?Sized> RegionsProvider for &'a mut T
impl<'a, T: 'a + RegionsProvider + ?Sized> RegionsProvider for &'a mut T
fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>
fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>
Source§fn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>>
fn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>>
Available on crate feature
async
only.Source§fn async_get_all(
&self,
opts: GetOptions,
) -> BoxFuture<'_, ApiResult<GotRegions>>
fn async_get_all( &self, opts: GetOptions, ) -> BoxFuture<'_, ApiResult<GotRegions>>
Available on crate feature
async
only.Source§impl<T: RegionsProvider + ?Sized> RegionsProvider for Box<T>
impl<T: RegionsProvider + ?Sized> RegionsProvider for Box<T>
fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>
fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>
Source§fn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>>
fn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>>
Available on crate feature
async
only.Source§fn async_get_all(
&self,
opts: GetOptions,
) -> BoxFuture<'_, ApiResult<GotRegions>>
fn async_get_all( &self, opts: GetOptions, ) -> BoxFuture<'_, ApiResult<GotRegions>>
Available on crate feature
async
only.Source§impl<T: RegionsProvider + ?Sized> RegionsProvider for Rc<T>
impl<T: RegionsProvider + ?Sized> RegionsProvider for Rc<T>
fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>
fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>
Source§fn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>>
fn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>>
Available on crate feature
async
only.Source§fn async_get_all(
&self,
opts: GetOptions,
) -> BoxFuture<'_, ApiResult<GotRegions>>
fn async_get_all( &self, opts: GetOptions, ) -> BoxFuture<'_, ApiResult<GotRegions>>
Available on crate feature
async
only.Source§impl<T: RegionsProvider + ?Sized> RegionsProvider for Arc<T>
impl<T: RegionsProvider + ?Sized> RegionsProvider for Arc<T>
fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>
fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>
Source§fn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>>
fn async_get(&self, opts: GetOptions) -> BoxFuture<'_, ApiResult<GotRegion>>
Available on crate feature
async
only.Source§fn async_get_all(
&self,
opts: GetOptions,
) -> BoxFuture<'_, ApiResult<GotRegions>>
fn async_get_all( &self, opts: GetOptions, ) -> BoxFuture<'_, ApiResult<GotRegions>>
Available on crate feature
async
only.