pub struct Watchlist {
pub domains: Vec<String>,
}Expand description
Persistent list of domains to monitor.
Fields§
§domains: Vec<String>Implementations§
Source§impl Watchlist
impl Watchlist
Sourcepub fn load() -> Result<Self>
pub fn load() -> Result<Self>
Loads the store from disk, returning an empty store when the file is missing or corrupt (a corrupt file is backed up first).
§Errors
A read failure other than a missing file (permission denied, a directory at the path, an I/O error): the file is left in place, and callers must not save over what they could not read.
Source§impl Watchlist
impl Watchlist
Sourcepub fn add(&mut self, domain: &str) -> Result<bool>
pub fn add(&mut self, domain: &str) -> Result<bool>
Adds a domain to the watchlist. Returns Ok(true) if the domain was newly added.
Entries are keyed by normalize_host,
which keeps www.: a watch runs per-host probes (TLS certificate, HTTP)
and www routinely serves a different site and certificate than the
apex. Entries saved by older versions (always without www.) load and
match unchanged.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Watchlist
impl<'de> Deserialize<'de> for Watchlist
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
Auto Trait Implementations§
impl Freeze for Watchlist
impl RefUnwindSafe for Watchlist
impl Send for Watchlist
impl Sync for Watchlist
impl Unpin for Watchlist
impl UnsafeUnpin for Watchlist
impl UnwindSafe for Watchlist
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more