pub struct Webhook {Show 14 fields
pub id: String,
pub url: String,
pub events: Vec<String>,
pub mode: WebhookMode,
pub is_active: bool,
pub failure_count: i32,
pub circuit_state: CircuitState,
pub api_version: Option<String>,
pub total_deliveries: i32,
pub successful_deliveries: i32,
pub success_rate: f64,
pub last_delivery_at: Option<String>,
pub created_at: Option<String>,
pub updated_at: Option<String>,
}Expand description
A webhook configuration.
Fields§
§id: StringUnique webhook identifier.
url: StringURL to receive webhook events.
events: Vec<String>List of subscribed event types.
mode: WebhookModeEvent mode filter (all, test, live).
is_active: boolWhether the webhook is active.
failure_count: i32Number of consecutive failures.
circuit_state: CircuitStateCircuit breaker state.
api_version: Option<String>API version for webhook payloads.
total_deliveries: i32Total number of delivery attempts.
successful_deliveries: i32Number of successful deliveries.
success_rate: f64Success rate percentage.
last_delivery_at: Option<String>Timestamp of last delivery attempt.
created_at: Option<String>Creation timestamp.
updated_at: Option<String>Last update timestamp.
Implementations§
Source§impl Webhook
impl Webhook
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
Returns true if the webhook is healthy (active and circuit closed).
Sourcepub fn is_circuit_open(&self) -> bool
pub fn is_circuit_open(&self) -> bool
Returns true if the circuit breaker is open.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Webhook
impl<'de> Deserialize<'de> for Webhook
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 Webhook
impl RefUnwindSafe for Webhook
impl Send for Webhook
impl Sync for Webhook
impl Unpin for Webhook
impl UnsafeUnpin for Webhook
impl UnwindSafe for Webhook
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