pub struct Watch {
pub id: WatchId,
pub url: String,
pub selector: Option<String>,
pub interval_secs: u64,
pub created_at: DateTime<Utc>,
pub last_check_at: Option<DateTime<Utc>>,
pub last_change_at: Option<DateTime<Utc>>,
pub last_etag: Option<String>,
pub last_last_modified: Option<String>,
pub snapshots: Vec<WatchSnapshot>,
pub consecutive_errors: u32,
pub options: WatchOptions,
}Expand description
A registered URL watch.
Fields§
§id: WatchIdStable 8-hex identifier.
url: StringURL being watched.
selector: Option<String>Optional CSS selector — only the matched subtree is hashed.
interval_secs: u64Polling interval in seconds.
created_at: DateTime<Utc>When this watch was created.
last_check_at: Option<DateTime<Utc>>When the URL was last polled (regardless of change).
last_change_at: Option<DateTime<Utc>>When content last differed from the previous snapshot.
last_etag: Option<String>ETag from the last 200/304 response (for conditional GET).
last_last_modified: Option<String>Last-Modified from the last 200/304 response (for conditional GET).
snapshots: Vec<WatchSnapshot>Light metadata about stored snapshots (body bytes are separate files).
consecutive_errors: u32Consecutive error count (reset on 200; mutes at 5).
options: WatchOptionsConfiguration options.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Watch
impl<'de> Deserialize<'de> for Watch
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 Watch
impl RefUnwindSafe for Watch
impl Send for Watch
impl Sync for Watch
impl Unpin for Watch
impl UnsafeUnpin for Watch
impl UnwindSafe for Watch
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