pub struct LocalUploadHook { /* private fields */ }Expand description
本地文件上传钩子
对应 TypeScript 版本的 CoolPlugin
Implementations§
Trait Implementations§
Source§impl UploadHook for LocalUploadHook
impl UploadHook for LocalUploadHook
Source§fn plugin_info(&self) -> &PluginInfo
fn plugin_info(&self) -> &PluginInfo
获取插件信息
Source§fn get_mode<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = UploadResult<Mode>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_mode<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = UploadResult<Mode>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获得上传模式
Source§fn down_and_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
file_name: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = UploadResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn down_and_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
file_name: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = UploadResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
下载并上传 Read more
Source§fn upload_with_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = UploadResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn upload_with_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = UploadResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
指定 Key(路径)上传,本地文件上传到存储服务 Read more
Source§fn upload<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 UploadContext,
) -> Pin<Box<dyn Future<Output = UploadResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upload<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 UploadContext,
) -> Pin<Box<dyn Future<Output = UploadResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
上传文件
Source§fn get_meta_file_obj<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = UploadResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_meta_file_obj<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = UploadResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获得原始操作对象(可选实现)
Auto Trait Implementations§
impl Freeze for LocalUploadHook
impl RefUnwindSafe for LocalUploadHook
impl Send for LocalUploadHook
impl Sync for LocalUploadHook
impl Unpin for LocalUploadHook
impl UnsafeUnpin for LocalUploadHook
impl UnwindSafe for LocalUploadHook
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more