pub enum WebhookRegistrationResult {
Created {
id: String,
},
Updated {
id: String,
},
AlreadyRegistered {
id: String,
},
Failed(WebhookError),
}Expand description
Result of a webhook registration operation.
This enum represents the outcome of attempting to register a webhook with Shopify. It indicates whether the webhook was created, updated, already existed, or failed.
§Example
use shopify_sdk::webhooks::WebhookRegistrationResult;
let result = WebhookRegistrationResult::Created {
id: "gid://shopify/WebhookSubscription/12345".to_string(),
};
match result {
WebhookRegistrationResult::Created { id } => {
println!("Created webhook with ID: {}", id);
}
_ => {}
}Variants§
Created
Webhook subscription was created in Shopify.
Updated
Webhook subscription was updated in Shopify.
AlreadyRegistered
Webhook subscription already exists and matches the desired configuration.
Failed(WebhookError)
Webhook registration failed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebhookRegistrationResult
impl !RefUnwindSafe for WebhookRegistrationResult
impl Send for WebhookRegistrationResult
impl Sync for WebhookRegistrationResult
impl Unpin for WebhookRegistrationResult
impl !UnwindSafe for WebhookRegistrationResult
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