Type Definition qiniu_http_client::SyncPart

source ·
pub type SyncPart<'a> = Part<SyncPartBody<'a>>;
Expand description

阻塞 Multipart 表单组件

Implementations§

source§

impl<'a> SyncPart<'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 Read + 'a) -> Self

设置阻塞 Multipart 的请求体为输入流

source

pub fn file_path<S: AsRef<OsStr> + ?Sized>(path: &S) -> IoResult<Self>

设置阻塞 Multipart 的请求体为文件