pub enum ParsedEntry {
LineBased(Entry),
Deb822(Entry),
}Expand description
Parsed watch entry that can be either line-based or deb822 format
Variants§
Implementations§
Source§impl ParsedEntry
impl ParsedEntry
Sourcepub fn matching_pattern(&self) -> Option<String>
pub fn matching_pattern(&self) -> Option<String>
Get the matching pattern
Sourcepub fn get_option(&self, key: &str) -> Option<String>
pub fn get_option(&self, key: &str) -> Option<String>
Get a generic option/field value by key (case-insensitive)
This handles the difference between line-based format (lowercase keys) and deb822 format (capitalized keys). It tries the key as-is first, then tries with the first letter capitalized.
Sourcepub fn has_option(&self, key: &str) -> bool
pub fn has_option(&self, key: &str) -> bool
Check if an option/field is set (case-insensitive)
Sourcepub fn format_url(
&self,
package: impl FnOnce() -> String,
) -> Result<Url, ParseError>
pub fn format_url( &self, package: impl FnOnce() -> String, ) -> Result<Url, ParseError>
Format the URL with package substitution
Sourcepub fn user_agent(&self) -> Option<String>
pub fn user_agent(&self) -> Option<String>
Get the user agent
Sourcepub fn pagemangle(&self) -> Option<String>
pub fn pagemangle(&self) -> Option<String>
Get the pagemangle option
Sourcepub fn uversionmangle(&self) -> Option<String>
pub fn uversionmangle(&self) -> Option<String>
Get the uversionmangle option
Sourcepub fn downloadurlmangle(&self) -> Option<String>
pub fn downloadurlmangle(&self) -> Option<String>
Get the downloadurlmangle option
Sourcepub fn pgpsigurlmangle(&self) -> Option<String>
pub fn pgpsigurlmangle(&self) -> Option<String>
Get the pgpsigurlmangle option
Sourcepub fn filenamemangle(&self) -> Option<String>
pub fn filenamemangle(&self) -> Option<String>
Get the filenamemangle option
Sourcepub fn oversionmangle(&self) -> Option<String>
pub fn oversionmangle(&self) -> Option<String>
Get the oversionmangle option
Sourcepub fn searchmode(&self) -> SearchMode
pub fn searchmode(&self) -> SearchMode
Get the searchmode, with default fallback
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParsedEntry
impl !RefUnwindSafe for ParsedEntry
impl !Send for ParsedEntry
impl !Sync for ParsedEntry
impl Unpin for ParsedEntry
impl !UnwindSafe for ParsedEntry
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