pub struct DeeplApi { /* private fields */ }Expand description
Interface to the DeepL API.
Implementations§
Source§impl DeeplApi
impl DeeplApi
Sourcepub fn new(options: ApiOptions) -> Self
pub fn new(options: ApiOptions) -> Self
Create a new DeepL API client.
Sourcepub async fn languages(&self, lang_type: LanguageType) -> Result<Vec<Language>>
pub async fn languages(&self, lang_type: LanguageType) -> Result<Vec<Language>>
Fetch supported languages.
Sourcepub async fn translate_text(
&self,
request: &TranslateTextRequest,
) -> Result<TranslateTextResponse>
pub async fn translate_text( &self, request: &TranslateTextRequest, ) -> Result<TranslateTextResponse>
Translate text.
Auto Trait Implementations§
impl Freeze for DeeplApi
impl !RefUnwindSafe for DeeplApi
impl Send for DeeplApi
impl Sync for DeeplApi
impl Unpin for DeeplApi
impl !UnwindSafe for DeeplApi
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