pub struct TranslationRequest<'a> {
pub source_text: &'a str,
pub target_language: &'a str,
pub source_language: Option<&'a str>,
}Expand description
A translation request sent to a Translator.
Fields§
§source_text: &'a strNumbered subtitle dialogue text in <N> text format.
target_language: &'a strTarget language code (e.g. "pt-BR", "en", "ja").
source_language: Option<&'a str>Optional source language code (e.g. "en", "ja").
Providers that support it (DeepL, Google) pass it to the API.
LLM providers include it in the prompt when set.
Trait Implementations§
Source§impl<'a> Clone for TranslationRequest<'a>
impl<'a> Clone for TranslationRequest<'a>
Source§fn clone(&self) -> TranslationRequest<'a>
fn clone(&self) -> TranslationRequest<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for TranslationRequest<'a>
impl<'a> RefUnwindSafe for TranslationRequest<'a>
impl<'a> Send for TranslationRequest<'a>
impl<'a> Sync for TranslationRequest<'a>
impl<'a> Unpin for TranslationRequest<'a>
impl<'a> UnsafeUnpin for TranslationRequest<'a>
impl<'a> UnwindSafe for TranslationRequest<'a>
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