pub enum WebhookResponse {
Ok {
message: String,
event_id: String,
},
Unauthorized {
message: String,
},
BadRequest {
message: String,
},
InternalError {
message: String,
},
}Expand description
HTTP response for webhook requests.
Represents the immediate HTTP response sent to GitHub after webhook validation and processing (but before handler execution).
Variants§
Ok
200 OK - Webhook accepted and queued for processing
401 Unauthorized - Invalid or missing signature
Fields
BadRequest
400 Bad Request - Malformed request (missing headers, invalid JSON)
InternalError
500 Internal Server Error - Processing failed
Implementations§
Source§impl WebhookResponse
impl WebhookResponse
Sourcepub fn status_code(&self) -> u16
pub fn status_code(&self) -> u16
Get the HTTP status code for this response.
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if response indicates success.
Trait Implementations§
Source§impl Clone for WebhookResponse
impl Clone for WebhookResponse
Source§fn clone(&self) -> WebhookResponse
fn clone(&self) -> WebhookResponse
Returns a duplicate of the value. Read more
1.0.0 · 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 WebhookResponse
impl RefUnwindSafe for WebhookResponse
impl Send for WebhookResponse
impl Sync for WebhookResponse
impl Unpin for WebhookResponse
impl UnsafeUnpin for WebhookResponse
impl UnwindSafe for WebhookResponse
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