pub struct YdlOptions {
pub language: Option<String>,
pub allow_auto_generated: bool,
pub prefer_manual: bool,
pub max_retries: u32,
pub timeout_seconds: u64,
pub user_agent: Option<String>,
pub proxy: Option<String>,
pub clean_content: bool,
pub validate_timing: bool,
}
Expand description
Configuration options for subtitle downloads
Fields§
§language: Option<String>
Preferred language code (e.g., “en”, “es”, “auto”)
allow_auto_generated: bool
Whether to allow auto-generated subtitles
prefer_manual: bool
Whether to prefer manual over auto-generated subtitles
max_retries: u32
Maximum retry attempts for failed requests
timeout_seconds: u64
Request timeout in seconds
user_agent: Option<String>
Custom User-Agent string
proxy: Option<String>
Proxy settings
clean_content: bool
Whether to clean/normalize subtitle content
validate_timing: bool
Whether to validate subtitle timing
Implementations§
Source§impl YdlOptions
impl YdlOptions
pub fn allow_auto_generated(self, allow: bool) -> Self
pub fn prefer_manual(self, prefer: bool) -> Self
pub fn max_retries(self, retries: u32) -> Self
pub fn timeout(self, seconds: u64) -> Self
pub fn user_agent(self, ua: &str) -> Self
pub fn proxy(self, proxy_url: &str) -> Self
pub fn clean_content(self, clean: bool) -> Self
pub fn validate_timing(self, validate: bool) -> Self
Trait Implementations§
Source§impl Clone for YdlOptions
impl Clone for YdlOptions
Source§fn clone(&self) -> YdlOptions
fn clone(&self) -> YdlOptions
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 YdlOptions
impl Debug for YdlOptions
Auto Trait Implementations§
impl Freeze for YdlOptions
impl RefUnwindSafe for YdlOptions
impl Send for YdlOptions
impl Sync for YdlOptions
impl Unpin for YdlOptions
impl UnwindSafe for YdlOptions
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