WatchEntry

Trait WatchEntry 

Source
pub trait WatchEntry {
Show 34 methods // Required methods fn url(&self) -> String; fn matching_pattern(&self) -> Option<String>; fn version_policy(&self) -> Result<Option<VersionPolicy>, ParseError>; fn script(&self) -> Option<String>; fn get_option(&self, key: &str) -> Option<String>; fn has_option(&self, key: &str) -> bool; // Provided methods fn component(&self) -> Option<String> { ... } fn ctype(&self) -> Result<Option<ComponentType>, ParseError> { ... } fn compression(&self) -> Result<Option<Compression>, ParseError> { ... } fn repack(&self) -> bool { ... } fn repacksuffix(&self) -> Option<String> { ... } fn mode(&self) -> Result<Mode, ParseError> { ... } fn pretty(&self) -> Result<Pretty, ParseError> { ... } fn date(&self) -> String { ... } fn gitexport(&self) -> Result<GitExport, ParseError> { ... } fn gitmode(&self) -> Result<GitMode, ParseError> { ... } fn pgpmode(&self) -> Result<PgpMode, ParseError> { ... } fn searchmode(&self) -> Result<SearchMode, ParseError> { ... } fn decompress(&self) -> bool { ... } fn bare(&self) -> bool { ... } fn user_agent(&self) -> Option<String> { ... } fn passive(&self) -> Option<bool> { ... } fn unzipoptions(&self) -> Option<String> { ... } fn dversionmangle(&self) -> Option<String> { ... } fn uversionmangle(&self) -> Option<String> { ... } fn downloadurlmangle(&self) -> Option<String> { ... } fn filenamemangle(&self) -> Option<String> { ... } fn pgpsigurlmangle(&self) -> Option<String> { ... } fn oversionmangle(&self) -> Option<String> { ... } fn pagemangle(&self) -> Option<String> { ... } fn dirversionmangle(&self) -> Option<String> { ... } fn versionmangle(&self) -> Option<String> { ... } fn hrefdecode(&self) -> Option<bool> { ... } fn format_url( &self, package: impl FnOnce() -> String, ) -> Result<Url, ParseError> { ... }
}
Expand description

Common trait for watch file entries across all formats

Required Methods§

Source

fn url(&self) -> String

Returns the URL of the entry

Source

fn matching_pattern(&self) -> Option<String>

Returns the matching pattern of the entry

Source

fn version_policy(&self) -> Result<Option<VersionPolicy>, ParseError>

Returns the version policy

Source

fn script(&self) -> Option<String>

Returns the script of the entry

Source

fn get_option(&self, key: &str) -> Option<String>

Get the value of a generic option by key

Source

fn has_option(&self, key: &str) -> bool

Check if an option is set

Provided Methods§

Source

fn component(&self) -> Option<String>

The name of the secondary source tarball

Source

fn ctype(&self) -> Result<Option<ComponentType>, ParseError>

Component type

Source

fn compression(&self) -> Result<Option<Compression>, ParseError>

Compression method

Source

fn repack(&self) -> bool

Repack the tarball

Source

fn repacksuffix(&self) -> Option<String>

Repack suffix

Source

fn mode(&self) -> Result<Mode, ParseError>

Retrieve the mode of the watch file entry

Source

fn pretty(&self) -> Result<Pretty, ParseError>

Return the git pretty mode

Source

fn date(&self) -> String

Set the date string used by the pretty option

Source

fn gitexport(&self) -> Result<GitExport, ParseError>

Return the git export mode

Source

fn gitmode(&self) -> Result<GitMode, ParseError>

Return the git mode

Source

fn pgpmode(&self) -> Result<PgpMode, ParseError>

Return the pgp mode

Source

fn searchmode(&self) -> Result<SearchMode, ParseError>

Return the search mode

Source

fn decompress(&self) -> bool

Return the decompression mode

Source

fn bare(&self) -> bool

Whether to disable all site specific special case code

Source

fn user_agent(&self) -> Option<String>

Set the user-agent string

Source

fn passive(&self) -> Option<bool>

Use PASV mode for the FTP connection

Source

fn unzipoptions(&self) -> Option<String>

Extra options to use with the unzip command

Source

fn dversionmangle(&self) -> Option<String>

Normalize the downloaded web page string

Source

fn uversionmangle(&self) -> Option<String>

Mangle the upstream version

Source

fn downloadurlmangle(&self) -> Option<String>

Mangle the download URL

Source

fn filenamemangle(&self) -> Option<String>

Mangle the filename

Source

fn pgpsigurlmangle(&self) -> Option<String>

Mangle the PGP signature URL

Source

fn oversionmangle(&self) -> Option<String>

Mangle the oversionmangle

Source

fn pagemangle(&self) -> Option<String>

Mangle the page content

Source

fn dirversionmangle(&self) -> Option<String>

Mangle the directory version

Source

fn versionmangle(&self) -> Option<String>

Mangle the version

Source

fn hrefdecode(&self) -> Option<bool>

Decode hrefs before matching

Source

fn format_url( &self, package: impl FnOnce() -> String, ) -> Result<Url, ParseError>

Replace all substitutions and return the resulting URL

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§