pub trait WebhookSender: Send + Sync {
// Required method
fn send(
&self,
changes: &[IpChange],
) -> impl Future<Output = Result<(), WebhookError>> + Send;
}Expand description
Trait for sending IP change notifications to external services.
This abstraction allows for different notification mechanisms (HTTP webhooks, message queues, etc.) and enables testing with mocks.
§Implementation Notes
Implementations should handle retries internally if appropriate,
returning WebhookError::MaxRetriesExceeded when all attempts fail.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.