pub struct TranslateOptions {
pub timeout: Option<Duration>,
pub max_retries: u32,
}Expand description
翻译配置选项
Fields§
§timeout: Option<Duration>请求超时时间,None 表示不超时
max_retries: u32最大重试次数
Implementations§
Source§impl TranslateOptions
impl TranslateOptions
Sourcepub fn no_timeout(self) -> Self
pub fn no_timeout(self) -> Self
禁用超时
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
设置最大重试次数
Sourcepub fn no_retries(self) -> Self
pub fn no_retries(self) -> Self
禁用重试
Trait Implementations§
Source§impl Clone for TranslateOptions
impl Clone for TranslateOptions
Source§fn clone(&self) -> TranslateOptions
fn clone(&self) -> TranslateOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TranslateOptions
impl Debug for TranslateOptions
Auto Trait Implementations§
impl Freeze for TranslateOptions
impl RefUnwindSafe for TranslateOptions
impl Send for TranslateOptions
impl Sync for TranslateOptions
impl Unpin for TranslateOptions
impl UnwindSafe for TranslateOptions
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