[−][src]Trait misskey::UploadFileClient
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
) -> Pin<Box<dyn Future<Output = Result<ApiResult<<R as Request>::Response>, Self::Error>> + Send, Global>> where
R: UploadFileRequest,
T: Read + Send + Sync + 'static,
[src]
&self,
request: R,
type_: Mime,
file_name: String,
content: T
) -> Pin<Box<dyn Future<Output = Result<ApiResult<<R as Request>::Response>, Self::Error>> + Send, Global>> where
R: UploadFileRequest,
T: Read + Send + Sync + 'static,
Dispatches an API request with file.
Takes the file to be attatched and UploadFileRequest
, then returns a future that waits for the Request::Response
.
Implementations on Foreign Types
impl<C> UploadFileClient for Box<C, Global> where
C: UploadFileClient + ?Sized,
[src]
C: UploadFileClient + ?Sized,
pub fn request_with_file<R, T>(
&self,
request: R,
type_: Mime,
file_name: String,
content: T
) -> Pin<Box<dyn Future<Output = Result<ApiResult<<R as Request>::Response>, <Box<C, Global> as Client>::Error>> + Send, Global>> where
R: UploadFileRequest,
T: Read + Send + Sync + 'static,
[src]
&self,
request: R,
type_: Mime,
file_name: String,
content: T
) -> Pin<Box<dyn Future<Output = Result<ApiResult<<R as Request>::Response>, <Box<C, Global> as Client>::Error>> + Send, Global>> where
R: UploadFileRequest,
T: Read + Send + Sync + 'static,
impl<'_, C> UploadFileClient for &'_ C where
C: UploadFileClient + ?Sized,
[src]
C: UploadFileClient + ?Sized,
pub fn request_with_file<R, T>(
&self,
request: R,
type_: Mime,
file_name: String,
content: T
) -> Pin<Box<dyn Future<Output = Result<ApiResult<<R as Request>::Response>, <&'_ C as Client>::Error>> + Send, Global>> where
R: UploadFileRequest,
T: Read + Send + Sync + 'static,
[src]
&self,
request: R,
type_: Mime,
file_name: String,
content: T
) -> Pin<Box<dyn Future<Output = Result<ApiResult<<R as Request>::Response>, <&'_ C as Client>::Error>> + Send, Global>> where
R: UploadFileRequest,
T: Read + Send + Sync + 'static,
impl<'_, C> UploadFileClient for &'_ mut C where
C: UploadFileClient + ?Sized,
[src]
C: UploadFileClient + ?Sized,
pub fn request_with_file<R, T>(
&self,
request: R,
type_: Mime,
file_name: String,
content: T
) -> Pin<Box<dyn Future<Output = Result<ApiResult<<R as Request>::Response>, <&'_ mut C as Client>::Error>> + Send, Global>> where
R: UploadFileRequest,
T: Read + Send + Sync + 'static,
[src]
&self,
request: R,
type_: Mime,
file_name: String,
content: T
) -> Pin<Box<dyn Future<Output = Result<ApiResult<<R as Request>::Response>, <&'_ mut C as Client>::Error>> + Send, Global>> where
R: UploadFileRequest,
T: Read + Send + Sync + 'static,