Type Definition qiniu_http_client::AsyncPart

source ·
pub type AsyncPart<'a> = Part<AsyncPartBody<'a>>;
Available on crate feature async only.
Expand description

异步 Multipart 表单组件

Implementations§

source§

impl<'a> AsyncPart<'a>

source

pub fn text(value: impl Into<Cow<'a, str>>) -> Self

设置异步 Multipart 的请求体为字符串

source

pub fn bytes(value: impl Into<Cow<'a, [u8]>>) -> Self

设置异步 Multipart 的请求体为内存数据

source

pub fn stream(value: impl AsyncRead + Send + Unpin + 'a) -> Self

设置异步 Multipart 的请求体为异步输入流

source

pub async fn file_path<S: AsRef<OsStr> + ?Sized>( path: &S ) -> IoResult<AsyncPart<'a>>

设置异步 Multipart 的请求体为文件