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§
Sourcefn matching_pattern(&self) -> Option<String>
fn matching_pattern(&self) -> Option<String>
Returns the matching pattern of the entry
Sourcefn version_policy(&self) -> Result<Option<VersionPolicy>, ParseError>
fn version_policy(&self) -> Result<Option<VersionPolicy>, ParseError>
Returns the version policy
Sourcefn get_option(&self, key: &str) -> Option<String>
fn get_option(&self, key: &str) -> Option<String>
Get the value of a generic option by key
Sourcefn has_option(&self, key: &str) -> bool
fn has_option(&self, key: &str) -> bool
Check if an option is set
Provided Methods§
Sourcefn ctype(&self) -> Result<Option<ComponentType>, ParseError>
fn ctype(&self) -> Result<Option<ComponentType>, ParseError>
Component type
Sourcefn compression(&self) -> Result<Option<Compression>, ParseError>
fn compression(&self) -> Result<Option<Compression>, ParseError>
Compression method
Sourcefn repacksuffix(&self) -> Option<String>
fn repacksuffix(&self) -> Option<String>
Repack suffix
Sourcefn mode(&self) -> Result<Mode, ParseError>
fn mode(&self) -> Result<Mode, ParseError>
Retrieve the mode of the watch file entry
Sourcefn pretty(&self) -> Result<Pretty, ParseError>
fn pretty(&self) -> Result<Pretty, ParseError>
Return the git pretty mode
Sourcefn gitexport(&self) -> Result<GitExport, ParseError>
fn gitexport(&self) -> Result<GitExport, ParseError>
Return the git export mode
Sourcefn gitmode(&self) -> Result<GitMode, ParseError>
fn gitmode(&self) -> Result<GitMode, ParseError>
Return the git mode
Sourcefn pgpmode(&self) -> Result<PgpMode, ParseError>
fn pgpmode(&self) -> Result<PgpMode, ParseError>
Return the pgp mode
Sourcefn searchmode(&self) -> Result<SearchMode, ParseError>
fn searchmode(&self) -> Result<SearchMode, ParseError>
Return the search mode
Sourcefn decompress(&self) -> bool
fn decompress(&self) -> bool
Return the decompression mode
Sourcefn user_agent(&self) -> Option<String>
fn user_agent(&self) -> Option<String>
Set the user-agent string
Sourcefn unzipoptions(&self) -> Option<String>
fn unzipoptions(&self) -> Option<String>
Extra options to use with the unzip command
Sourcefn dversionmangle(&self) -> Option<String>
fn dversionmangle(&self) -> Option<String>
Normalize the downloaded web page string
Sourcefn uversionmangle(&self) -> Option<String>
fn uversionmangle(&self) -> Option<String>
Mangle the upstream version
Sourcefn downloadurlmangle(&self) -> Option<String>
fn downloadurlmangle(&self) -> Option<String>
Mangle the download URL
Sourcefn filenamemangle(&self) -> Option<String>
fn filenamemangle(&self) -> Option<String>
Mangle the filename
Sourcefn pgpsigurlmangle(&self) -> Option<String>
fn pgpsigurlmangle(&self) -> Option<String>
Mangle the PGP signature URL
Sourcefn oversionmangle(&self) -> Option<String>
fn oversionmangle(&self) -> Option<String>
Mangle the oversionmangle
Sourcefn pagemangle(&self) -> Option<String>
fn pagemangle(&self) -> Option<String>
Mangle the page content
Sourcefn dirversionmangle(&self) -> Option<String>
fn dirversionmangle(&self) -> Option<String>
Mangle the directory version
Sourcefn versionmangle(&self) -> Option<String>
fn versionmangle(&self) -> Option<String>
Mangle the version
Sourcefn hrefdecode(&self) -> Option<bool>
fn hrefdecode(&self) -> Option<bool>
Decode hrefs before matching
Sourcefn format_url(
&self,
package: impl FnOnce() -> String,
) -> Result<Url, ParseError>
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.