Entry

Struct Entry 

Source
pub struct Entry(/* private fields */);
Expand description

A node in the syntax tree for $ast

Implementations§

Source§

impl Entry

Source

pub fn option_list(&self) -> Option<OptionList>

List of options

Source

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

Get the value of an option

Source

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

Check if an option is set

Source

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

The name of the secondary source tarball

Source

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

Component type

Source

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

Compression method

Source

pub fn repack(&self) -> bool

Repack the tarball

Source

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

Repack suffix

Source

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

Retrieve the mode of the watch file entry.

Source

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

Return the git pretty mode

Source

pub fn date(&self) -> String

Set the date string used by the pretty option to an arbitrary format as an optional opts argument when the matching-pattern is HEAD or heads/branch for git mode.

Source

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

Return the git export mode

Source

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

Return the git mode

Source

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

Return the pgp mode

Source

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

Return the search mode

Source

pub fn decompress(&self) -> bool

Return the decompression mode

Source

pub fn bare(&self) -> bool

Whether to disable all site specific special case code such as URL director uses and page content alterations.

Source

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

Set the user-agent string used to contact the HTTP(S) server as user-agent-string. (persistent)

Source

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

Use PASV mode for the FTP connection.

Source

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

Add the extra options to use with the unzip command, such as -a, -aa, and -b, when executed by mk-origtargz.

Source

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

Normalize the downloaded web page string.

Source

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

Normalize the directory path string matching the regex in a set of parentheses of http://URL as the sortable version index string. This is used as the directory path sorting index only.

Source

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

Normalize the downloaded web page string.

Source

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

Normalize the candidate upstream version strings extracted from hrefs in the source of the web page. This is used as the version sorting index when selecting the latest upstream version.

Source

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

Syntactic shorthand for uversionmangle=rules, dversionmangle=rules

Source

pub fn hrefdecode(&self) -> bool

Convert the selected upstream tarball href string from the percent-encoded hexadecimal string to the decoded normal URL string for obfuscated web sites. Only percent-encoding is available and it is decoded with s/%([A-Fa-f\d]{2})/chr hex $1/eg.

Source

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

Convert the selected upstream tarball href string into the accessible URL for obfuscated web sites. This is run after hrefdecode.

Source

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

Generate the upstream tarball filename from the selected href string if matching-pattern can extract the latest upstream version from the selected href string. Otherwise, generate the upstream tarball filename from its full URL string and set the missing from the generated upstream tarball filename.

Without this option, the default upstream tarball filename is generated by taking the last component of the URL and removing everything after any ‘?’ or ‘#’.

Source

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

Generate the candidate upstream signature file URL string from the upstream tarball URL.

Source

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

Generate the version string of the source tarball _.orig.tar.gz from . This should be used to add a suffix such as +dfsg to a MUT package.

Source

pub fn opts(&self) -> HashMap<String, String>

Returns options set

Source

pub fn url(&self) -> String

Returns the URL of the entry.

Source

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

Returns the matching pattern of the entry.

Source

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

Returns the version policy

Source

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

Returns the script of the entry.

Source

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

Replace all substitutions and return the resulting URL.

Trait Implementations§

Source§

impl Clone for Entry

Source§

fn clone(&self) -> Entry

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Entry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Entry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for Entry

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Entry

Source§

fn eq(&self, other: &Entry) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl WatchEntry for Entry

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
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
Source§

impl Eq for Entry

Source§

impl StructuralPartialEq for Entry

Auto Trait Implementations§

§

impl Freeze for Entry

§

impl !RefUnwindSafe for Entry

§

impl !Send for Entry

§

impl !Sync for Entry

§

impl Unpin for Entry

§

impl !UnwindSafe for Entry

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.