pub struct WatchlistConfig {
pub schema_version: u16,
pub default_scope: WatchScope,
pub schedule: Option<ScanSchedule>,
pub targets: Vec<WatchTarget>,
}Expand description
Top-level watchlist configuration.
Fields§
§schema_version: u16Schema version for tolerant future readers.
default_scope: WatchScopeOptional default scan scope inherited by every target.
schedule: Option<ScanSchedule>Optional repeated-scan policy. Runtime surfaces decide how to execute it.
targets: Vec<WatchTarget>Watched identities.
Implementations§
Source§impl WatchlistConfig
impl WatchlistConfig
Sourcepub fn validate(&self) -> Result<(), WatchlistError>
pub fn validate(&self) -> Result<(), WatchlistError>
Validate targets, aliases, and duplicate scan usernames.
The same concrete username appearing twice is rejected even if it arrives through aliases, because a later timeline cannot safely decide which watched identity owns that scan artifact.
Sourcepub fn scan_targets(&self) -> Result<Vec<WatchScanTarget>, WatchlistError>
pub fn scan_targets(&self) -> Result<Vec<WatchScanTarget>, WatchlistError>
Expand watched identities into concrete scan targets.
Each target yields one scan for its primary username and one scan per alias. The returned scope is the merged default + per-target scope.
Trait Implementations§
Source§impl Clone for WatchlistConfig
impl Clone for WatchlistConfig
Source§fn clone(&self) -> WatchlistConfig
fn clone(&self) -> WatchlistConfig
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 WatchlistConfig
impl Debug for WatchlistConfig
Source§impl Default for WatchlistConfig
impl Default for WatchlistConfig
Source§impl<'de> Deserialize<'de> for WatchlistConfig
impl<'de> Deserialize<'de> for WatchlistConfig
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 WatchlistConfig
Source§impl PartialEq for WatchlistConfig
impl PartialEq for WatchlistConfig
Source§fn eq(&self, other: &WatchlistConfig) -> bool
fn eq(&self, other: &WatchlistConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for WatchlistConfig
impl Serialize for WatchlistConfig
impl StructuralPartialEq for WatchlistConfig
Auto Trait Implementations§
impl Freeze for WatchlistConfig
impl RefUnwindSafe for WatchlistConfig
impl Send for WatchlistConfig
impl Sync for WatchlistConfig
impl Unpin for WatchlistConfig
impl UnsafeUnpin for WatchlistConfig
impl UnwindSafe for WatchlistConfig
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.