pub struct Payload {
pub action: Action,
pub sender: User,
pub repository: Repository,
pub comment: Option<Comment>,
pub issue: Option<Issue>,
}
Expand description
Payload
represents the (JSON) payload of the webhook Github send us.
Every webhook includes this payload. The presence of the Option
al fields
depends on the event type this payload was send for.
For some event types there exists a specialized type with Option<T>
changed for T
where possible. Conversion from Payload
to a more
specialized type can be done through TryInto
implementations.
Fields§
§action: Action
The action (created/edited/deleted) that triggered the webhook.
sender: User
The account that triggered the action that triggered the webhook.
repository: Repository
The repository associated with the webhook.
comment: Option<Comment>
The comment involved in the action. Only present for some event types.
issue: Option<Issue>
The issue involved in the action. Only present for some event types.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Payload
impl<'de> Deserialize<'de> for Payload
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 Payload
impl RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnwindSafe for Payload
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