pub trait Watcher: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn kind(&self) -> &'static str;
fn poll_interval(&self) -> Duration;
fn poll<'life0, 'life1, 'async_trait>(
&'life0 mut self,
state: &'life1 ServerState,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Available on crate features
serve and triggers only.Expand description
One pollable watcher (object_arrival / queue_depth). Webhook is push, not polled, so it does not implement this.
Required Methods§
fn name(&self) -> &str
fn kind(&self) -> &'static str
fn poll_interval(&self) -> Duration
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Watcher for ObjectArrivalWatcher
Available on crate feature
triggers-object-store only.impl Watcher for QueueDepthWatcher
Available on crate features
triggers-kafka or triggers-redis only.