pub struct WebhookResponse {
pub status: HttpStatus,
pub body: String,
pub content_type: String,
}
Expand description
Generic webhook response that can be converted to any framework’s response type
Fields§
§status: HttpStatus
§body: String
§content_type: String
Implementations§
Source§impl WebhookResponse
impl WebhookResponse
pub fn success(message: InboundMessage) -> Self
pub fn error(status: HttpStatus, message: &str) -> Self
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 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