pub struct WatchScope {
pub only: Vec<String>,
pub exclude: Vec<String>,
pub tag: Vec<String>,
pub exclude_tag: Vec<String>,
pub include_nsfw: Option<bool>,
pub top: Option<u32>,
}Expand description
Site/tag scope for watchlist scans.
Fields§
§only: Vec<String>Keep only sites whose name contains at least one term.
exclude: Vec<String>Drop sites whose name contains any term.
tag: Vec<String>Keep only sites carrying at least one requested tag.
exclude_tag: Vec<String>Drop sites carrying any of these tags.
include_nsfw: Option<bool>Include nsfw-tagged sites. None means inherit the default scope.
top: Option<u32>Optional popularity-rank ceiling.
Implementations§
Source§impl WatchScope
impl WatchScope
Sourcepub fn merged(&self, override_scope: &Self) -> Self
pub fn merged(&self, override_scope: &Self) -> Self
Merge a default scope with an overriding per-target scope.
List fields are appended so a target can narrow a default scope with extra include/exclude terms. Scalar fields override only when set.
Sourcepub fn to_site_filter(&self) -> SiteFilter
pub fn to_site_filter(&self) -> SiteFilter
Convert into the core registry filter.
Trait Implementations§
Source§impl Clone for WatchScope
impl Clone for WatchScope
Source§fn clone(&self) -> WatchScope
fn clone(&self) -> WatchScope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WatchScope
impl Debug for WatchScope
Source§impl Default for WatchScope
impl Default for WatchScope
Source§fn default() -> WatchScope
fn default() -> WatchScope
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WatchScope
impl<'de> Deserialize<'de> for WatchScope
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for WatchScope
Source§impl PartialEq for WatchScope
impl PartialEq for WatchScope
Source§fn eq(&self, other: &WatchScope) -> bool
fn eq(&self, other: &WatchScope) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for WatchScope
impl Serialize for WatchScope
impl StructuralPartialEq for WatchScope
Auto Trait Implementations§
impl Freeze for WatchScope
impl RefUnwindSafe for WatchScope
impl Send for WatchScope
impl Sync for WatchScope
impl Unpin for WatchScope
impl UnsafeUnpin for WatchScope
impl UnwindSafe for WatchScope
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.