pub enum WatchAction {
SetEntryMatchingPattern {
file: PathBuf,
url: String,
new_pattern: String,
},
RemoveEntryOption {
file: PathBuf,
url: String,
option: String,
},
SetEntryOption {
file: PathBuf,
url: String,
option: String,
value: String,
},
SetEntryUrl {
file: PathBuf,
url: String,
new_url: String,
},
ConvertEntryToTemplate {
file: PathBuf,
url: String,
},
}Expand description
Edits to a debian/watch file.
Watch files are line-oriented, with each non-comment line describing a
release-monitor entry: a URL, a matching regexp for the version, and
optional opts=... flags. We address an entry by its current URL,
which is unique across the watch files we routinely fix.
Variants§
SetEntryMatchingPattern
Replace the matching pattern (the regexp following the URL) of the
entry whose current URL is url. A no-op if no entry matches.
Fields
RemoveEntryOption
Remove an opts=... option from the entry whose current URL is
url. A no-op if no entry matches or the option isn’t set.
Fields
SetEntryOption
Set (or insert) an opts=... option on the entry whose current URL
is url. A no-op if no entry matches or the option already has the
requested value.
Fields
SetEntryUrl
Replace the URL of the entry whose current URL is url. A no-op if
no entry matches.
Fields
ConvertEntryToTemplate
Convert the v5 entry whose current URL is url to its template
form (Template:/Owner:/Project: for GitHub, Template:/Dist: for
CPAN/PyPI, etc.). A no-op if the entry is already a template,
no template matches the URL/pattern, or no entry has that URL.
Trait Implementations§
Source§impl Clone for WatchAction
impl Clone for WatchAction
Source§fn clone(&self) -> WatchAction
fn clone(&self) -> WatchAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WatchAction
impl Debug for WatchAction
Source§impl<'de> Deserialize<'de> for WatchAction
impl<'de> Deserialize<'de> for WatchAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for WatchAction
impl PartialEq for WatchAction
Source§fn eq(&self, other: &WatchAction) -> bool
fn eq(&self, other: &WatchAction) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for WatchAction
impl Serialize for WatchAction
impl Eq for WatchAction
impl StructuralPartialEq for WatchAction
Auto Trait Implementations§
impl Freeze for WatchAction
impl RefUnwindSafe for WatchAction
impl Send for WatchAction
impl Sync for WatchAction
impl Unpin for WatchAction
impl UnsafeUnpin for WatchAction
impl UnwindSafe for WatchAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.