[][src]Trait misskey_core::UploadFileClient

pub trait UploadFileClient: Client {
    pub fn request_with_file<R, T>(
        &self,
        request: R,
        type_: Mime,
        file_name: String,
        content: T
    ) -> BoxFuture<'_, Result<ApiResult<R::Response>, Self::Error>>
    where
        R: UploadFileRequest,
        T: Read + Send + Sync + 'static
; }

Abstraction over API clients that can upload files.

Required methods

pub fn request_with_file<R, T>(
    &self,
    request: R,
    type_: Mime,
    file_name: String,
    content: T
) -> BoxFuture<'_, Result<ApiResult<R::Response>, Self::Error>> where
    R: UploadFileRequest,
    T: Read + Send + Sync + 'static, 
[src]

Dispatches an API request with file.

Takes the file to be attatched and UploadFileRequest, then returns a future that waits for the Request::Response.

Loading content...

Implementations on Foreign Types

impl<C: ?Sized, '_> UploadFileClient for &'_ C where
    C: UploadFileClient
[src]

impl<C: ?Sized, '_> UploadFileClient for &'_ mut C where
    C: UploadFileClient
[src]

impl<C: ?Sized> UploadFileClient for Box<C> where
    C: UploadFileClient
[src]

Loading content...

Implementors

Loading content...