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§

source

fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>

返回七牛区域信息

该方法的异步版本为 Self::async_get

Provided Methods§

source

fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>

返回多个七牛区域信息

该方法的异步版本为 Self::async_get_all

source

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>>

Available on crate feature async only.

异步返回多个七牛区域信息

Trait Implementations§

source§

impl<'clone> Clone for Box<dyn RegionsProvider + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn RegionsProvider + Send + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn RegionsProvider + Send + Sync + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn RegionsProvider + Sync + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementations on Foreign Types§

source§

impl<T: RegionsProvider + ?Sized> RegionsProvider for Arc<T>where Arc<T>: DynClone + Debug + Sync + Send,

source§

fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>

source§

fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>

source§

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>>

Available on crate feature async only.
source§

impl<'a, T: 'a + RegionsProvider + ?Sized> RegionsProvider for &'a mut Twhere &'a mut T: DynClone + Debug + Sync + Send,

source§

fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>

source§

fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>

source§

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>>

Available on crate feature async only.
source§

impl<T: RegionsProvider + ?Sized> RegionsProvider for Box<T>where Box<T>: DynClone + Debug + Sync + Send,

source§

fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>

source§

fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>

source§

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>>

Available on crate feature async only.
source§

impl<T: RegionsProvider + ?Sized> RegionsProvider for Rc<T>where Rc<T>: DynClone + Debug + Sync + Send,

source§

fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>

source§

fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>

source§

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>>

Available on crate feature async only.
source§

impl<'a, T: 'a + RegionsProvider + ?Sized> RegionsProvider for &'a Twhere &'a T: DynClone + Debug + Sync + Send,

source§

fn get(&self, opts: GetOptions) -> ApiResult<GotRegion>

source§

fn get_all(&self, opts: GetOptions) -> ApiResult<GotRegions>

source§

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>>

Available on crate feature async only.

Implementors§