pub struct SimpleWebhookTrigger {
pub url: String,
}Expand description
A lightweight webhook trigger keyed only by destination URL.
Unlike WebhookTrigger (which is path-routed), SimpleWebhookTrigger
holds the full URL and exposes a single fire method that
returns a human-readable report string describing the event it would
dispatch. No actual HTTP call is made; the implementation is deliberately
synchronous and allocation-free for use in tests and offline pipelines.
§Example
use oximedia_workflow::webhook_trigger::SimpleWebhookTrigger;
let trigger = SimpleWebhookTrigger::new("https://example.com/hooks/ingest");
let report = trigger.fire("job.complete");
assert!(report.contains("job.complete"));
assert!(report.contains("example.com"));Fields§
§url: StringDestination URL for the webhook.
Implementations§
Source§impl SimpleWebhookTrigger
impl SimpleWebhookTrigger
Trait Implementations§
Source§impl Clone for SimpleWebhookTrigger
impl Clone for SimpleWebhookTrigger
Source§fn clone(&self) -> SimpleWebhookTrigger
fn clone(&self) -> SimpleWebhookTrigger
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SimpleWebhookTrigger
impl RefUnwindSafe for SimpleWebhookTrigger
impl Send for SimpleWebhookTrigger
impl Sync for SimpleWebhookTrigger
impl Unpin for SimpleWebhookTrigger
impl UnsafeUnpin for SimpleWebhookTrigger
impl UnwindSafe for SimpleWebhookTrigger
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