pub struct InboundData {Show 18 fields
pub sender: User,
pub action: Option<String>,
pub repository: Option<Repository>,
pub organization: Option<Organization>,
pub comment: Option<Comment>,
pub discussion: Option<Discussion>,
pub forkee: Option<Repository>,
pub issue: Option<Issue>,
pub label: Option<Label>,
pub marketplace_purchase: Option<MarketplacePurchase>,
pub pull_request: Option<PullRequest>,
pub review: Option<Review>,
pub release: Option<Release>,
pub starred_at: Option<String>,
pub workflow_job: Option<WorkflowJob>,
pub head_commit: Option<Commit>,
pub commits: Option<Vec<Commit>>,
pub extra: HashMap<String, Value>,
}Fields§
§sender: User§action: Option<String>§repository: Option<Repository>§organization: Option<Organization>§comment: Option<Comment>§discussion: Option<Discussion>§forkee: Option<Repository>§issue: Option<Issue>§label: Option<Label>§marketplace_purchase: Option<MarketplacePurchase>§pull_request: Option<PullRequest>§review: Option<Review>§release: Option<Release>§starred_at: Option<String>§workflow_job: Option<WorkflowJob>§head_commit: Option<Commit>§commits: Option<Vec<Commit>>§extra: HashMap<String, Value>Implementations§
Source§impl InboundData
impl InboundData
Sourcepub fn get<T: DeserializeOwned, I: ToString>(
&self,
index: &I,
) -> Result<T, String>
pub fn get<T: DeserializeOwned, I: ToString>( &self, index: &I, ) -> Result<T, String>
Gets the value from extra and deserializes into T.
eg.
let r#ref: String = payload.get("ref").unwrap();pub fn get_action(&self) -> Result<&String, String>
pub fn get_repository(&self) -> Result<&Repository, String>
pub fn get_comment(&self) -> Result<&Comment, String>
pub fn get_discussion(&self) -> Result<&Discussion, String>
pub fn get_fork(&self) -> Result<&Repository, String>
pub fn get_issue(&self) -> Result<&Issue, String>
pub fn get_label(&self) -> Result<&Label, String>
pub fn get_marketplace_purchase(&self) -> Result<&MarketplacePurchase, String>
pub fn get_pull_request(&self) -> Result<&PullRequest, String>
pub fn get_review(&self) -> Result<&Review, String>
pub fn get_release(&self) -> Result<&Release, String>
pub fn get_starred_at(&self) -> Result<&String, String>
pub fn get_workflow_job(&self) -> Result<&WorkflowJob, String>
pub fn get_head_commit(&self) -> Result<&Commit, String>
pub fn get_commits(&self) -> Result<&Vec<Commit>, String>
Trait Implementations§
Source§impl Debug for InboundData
impl Debug for InboundData
Source§impl<'de> Deserialize<'de> for InboundData
impl<'de> Deserialize<'de> for InboundData
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 InboundData
impl RefUnwindSafe for InboundData
impl Send for InboundData
impl Sync for InboundData
impl Unpin for InboundData
impl UnwindSafe for InboundData
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