pub trait DownloadUrlsGenerator: DynClone + Debug + Sync + Send {
    // Required method
    fn generate(
        &self,
        object_name: &str,
        options: GeneratorOptions<'_>
    ) -> ApiResult<Vec<Uri>>;

    // Provided method
    fn async_generate<'a>(
        &'a self,
        object_name: &'a str,
        options: GeneratorOptions<'a>
    ) -> BoxFuture<'a, ApiResult<Vec<Uri>>> { ... }
}
Expand description

生成下载 URL 列表的接口

同时提供阻塞接口和异步接口,异步接口则需要启用 async 功能

Required Methods§

source

fn generate( &self, object_name: &str, options: GeneratorOptions<'_> ) -> ApiResult<Vec<Uri>>

生成下载 URL 列表

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

Provided Methods§

source

fn async_generate<'a>( &'a self, object_name: &'a str, options: GeneratorOptions<'a> ) -> BoxFuture<'a, ApiResult<Vec<Uri>>>

Available on crate feature async only.

异步生成下载 URL 列表

Implementations on Foreign Types§

source§

impl<'b, T: 'b + DownloadUrlsGenerator + ?Sized> DownloadUrlsGenerator for &'b T
where &'b T: DynClone + Debug + Sync + Send,

source§

fn generate( &self, object_name: &str, options: GeneratorOptions<'_> ) -> ApiResult<Vec<Uri>>

source§

fn async_generate<'a>( &'a self, object_name: &'a str, options: GeneratorOptions<'a> ) -> BoxFuture<'a, ApiResult<Vec<Uri>>>

Available on crate feature async only.
source§

impl<'b, T: 'b + DownloadUrlsGenerator + ?Sized> DownloadUrlsGenerator for &'b mut T

source§

fn generate( &self, object_name: &str, options: GeneratorOptions<'_> ) -> ApiResult<Vec<Uri>>

source§

fn async_generate<'a>( &'a self, object_name: &'a str, options: GeneratorOptions<'a> ) -> BoxFuture<'a, ApiResult<Vec<Uri>>>

Available on crate feature async only.
source§

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

source§

fn generate( &self, object_name: &str, options: GeneratorOptions<'_> ) -> ApiResult<Vec<Uri>>

source§

fn async_generate<'a>( &'a self, object_name: &'a str, options: GeneratorOptions<'a> ) -> BoxFuture<'a, ApiResult<Vec<Uri>>>

Available on crate feature async only.
source§

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

source§

fn generate( &self, object_name: &str, options: GeneratorOptions<'_> ) -> ApiResult<Vec<Uri>>

source§

fn async_generate<'a>( &'a self, object_name: &'a str, options: GeneratorOptions<'a> ) -> BoxFuture<'a, ApiResult<Vec<Uri>>>

Available on crate feature async only.
source§

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

source§

fn generate( &self, object_name: &str, options: GeneratorOptions<'_> ) -> ApiResult<Vec<Uri>>

source§

fn async_generate<'a>( &'a self, object_name: &'a str, options: GeneratorOptions<'a> ) -> BoxFuture<'a, ApiResult<Vec<Uri>>>

Available on crate feature async only.

Implementors§