pub struct WebhookRequestBody {
pub description: Option<String>,
pub required: Option<bool>,
pub content: HashMap<String, MediaTypeObject>,
}Expand description
Request body for webhook
Fields§
§description: Option<String>Description of the request body
required: Option<bool>Whether the body is required
content: HashMap<String, MediaTypeObject>Content by media type
Implementations§
Source§impl WebhookRequestBody
impl WebhookRequestBody
Sourcepub fn json(schema: JsonSchema2020) -> Self
pub fn json(schema: JsonSchema2020) -> Self
Create a new request body with JSON content
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set description
Trait Implementations§
Source§impl Clone for WebhookRequestBody
impl Clone for WebhookRequestBody
Source§fn clone(&self) -> WebhookRequestBody
fn clone(&self) -> WebhookRequestBody
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 moreSource§impl Debug for WebhookRequestBody
impl Debug for WebhookRequestBody
Source§impl<'de> Deserialize<'de> for WebhookRequestBody
impl<'de> Deserialize<'de> for WebhookRequestBody
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 WebhookRequestBody
impl RefUnwindSafe for WebhookRequestBody
impl Send for WebhookRequestBody
impl Sync for WebhookRequestBody
impl Unpin for WebhookRequestBody
impl UnwindSafe for WebhookRequestBody
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