pub struct TranslationResponse {
pub translated_text: String,
pub detected_source_lang: Option<String>,
}Expand description
翻译响应
从翻译API返回的响应结构。
Fields§
§translated_text: String翻译后的文本
detected_source_lang: Option<String>检测到的源语言
Trait Implementations§
Source§impl Clone for TranslationResponse
impl Clone for TranslationResponse
Source§fn clone(&self) -> TranslationResponse
fn clone(&self) -> TranslationResponse
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 TranslationResponse
impl Debug for TranslationResponse
Source§impl<'de> Deserialize<'de> for TranslationResponse
impl<'de> Deserialize<'de> for TranslationResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TranslationResponse
impl RefUnwindSafe for TranslationResponse
impl Send for TranslationResponse
impl Sync for TranslationResponse
impl Unpin for TranslationResponse
impl UnwindSafe for TranslationResponse
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