pub struct ParserConfig {
pub url: String,
pub original_url: String,
pub base_url: String,
pub custom_parser_args: BTreeMap<String, String>,
pub headers: BTreeMap<String, String>,
pub append_url_params: bool,
pub urlprocessor_args: Option<String>,
pub key_retry_count: u32,
pub ad_keywords: Vec<String>,
pub custom_method: Option<EncryptionMethod>,
pub custom_key: Option<Vec<u8>>,
pub custom_iv: Option<Vec<u8>>,
/* private fields */
}Expand description
Parser and loader configuration shared by manifest processors.
Fields§
§url: StringCurrent URL after redirects.
original_url: StringOriginal user input URL.
base_url: StringBase URL override.
custom_parser_args: BTreeMap<String, String>Custom parser arguments.
headers: BTreeMap<String, String>Request headers.
append_url_params: boolAppend the manifest query string to processed segment URLs.
urlprocessor_args: Option<String>Arguments for custom URL processors.
key_retry_count: u32Key retry count.
ad_keywords: Vec<String>Segment URL keywords retained for higher-level cleanup after selection.
custom_method: Option<EncryptionMethod>Custom encryption method override.
custom_key: Option<Vec<u8>>Custom key override.
custom_iv: Option<Vec<u8>>Custom IV override.
Implementations§
Source§impl ParserConfig
impl ParserConfig
Sourcepub fn from_options(options: &DownloadOptions) -> Self
pub fn from_options(options: &DownloadOptions) -> Self
Builds parser configuration from public download options.
Sourcepub fn push_diagnostic(&self, level: LogLevel, message: impl Into<String>)
pub fn push_diagnostic(&self, level: LogLevel, message: impl Into<String>)
Appends a parser diagnostic for the session to consume.
Sourcepub fn drain_diagnostics(&self) -> Vec<ParserDiagnostic>
pub fn drain_diagnostics(&self) -> Vec<ParserDiagnostic>
Drains pending parser diagnostics.
Trait Implementations§
Source§impl Clone for ParserConfig
impl Clone for ParserConfig
Source§fn clone(&self) -> ParserConfig
fn clone(&self) -> ParserConfig
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 moreSource§impl Debug for ParserConfig
impl Debug for ParserConfig
Auto Trait Implementations§
impl Freeze for ParserConfig
impl RefUnwindSafe for ParserConfig
impl Send for ParserConfig
impl Sync for ParserConfig
impl Unpin for ParserConfig
impl UnsafeUnpin for ParserConfig
impl UnwindSafe for ParserConfig
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