pub struct RequestOptionBuilder { /* private fields */ }Expand description
请求选项构建器
使用 Builder 模式方便配置请求选项
Implementations§
Source§impl RequestOptionBuilder
impl RequestOptionBuilder
Sourcepub fn tenant_key(self, tenant_key: impl ToString) -> Self
pub fn tenant_key(self, tenant_key: impl ToString) -> Self
设置租户键
Sourcepub fn user_access_token(self, user_access_token: impl ToString) -> Self
pub fn user_access_token(self, user_access_token: impl ToString) -> Self
设置用户访问令牌
Sourcepub fn app_access_token(self, app_access_token: impl ToString) -> Self
pub fn app_access_token(self, app_access_token: impl ToString) -> Self
设置应用访问令牌
Sourcepub fn tenant_access_token(self, tenant_access_token: impl ToString) -> Self
pub fn tenant_access_token(self, tenant_access_token: impl ToString) -> Self
设置租户访问令牌
Sourcepub fn need_helpdesk_auth(self, need_helpdesk_auth: bool) -> Self
pub fn need_helpdesk_auth(self, need_helpdesk_auth: bool) -> Self
设置是否需要帮助台认证
Sourcepub fn request_id(self, request_id: impl ToString) -> Self
pub fn request_id(self, request_id: impl ToString) -> Self
设置请求 ID
Sourcepub fn app_ticket(self, app_ticket: impl ToString) -> Self
pub fn app_ticket(self, app_ticket: impl ToString) -> Self
设置应用票据
Sourcepub fn file_upload(self, file_upload: bool) -> Self
pub fn file_upload(self, file_upload: bool) -> Self
设置是否上传文件
Sourcepub fn file_download(self, file_download: bool) -> Self
pub fn file_download(self, file_download: bool) -> Self
设置是否下载文件
Sourcepub fn add_header(self, key: impl ToString, value: impl ToString) -> Self
pub fn add_header(self, key: impl ToString, value: impl ToString) -> Self
添加请求头
Sourcepub fn build(self) -> RequestOption
pub fn build(self) -> RequestOption
构建 RequestOption
Trait Implementations§
Source§impl Default for RequestOptionBuilder
impl Default for RequestOptionBuilder
Source§fn default() -> RequestOptionBuilder
fn default() -> RequestOptionBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RequestOptionBuilder
impl RefUnwindSafe for RequestOptionBuilder
impl Send for RequestOptionBuilder
impl Sync for RequestOptionBuilder
impl Unpin for RequestOptionBuilder
impl UnsafeUnpin for RequestOptionBuilder
impl UnwindSafe for RequestOptionBuilder
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