#[non_exhaustive]pub struct Event {
pub id: String,
pub event_type: String,
pub repo: Repository,
pub created_at: String,
pub public: bool,
pub payload: Value,
}Expand description
One entry from /users/{username}/events. Fields are
sparse; we keep just enough to identify the event type,
associated repo, and the actor.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: String§event_type: String"PushEvent", "PullRequestEvent",
"PullRequestReviewCommentEvent", etc.
repo: Repository§created_at: String§public: boolWhether the event happened in a public repository. GitHub sets it on every event; a missing value reads as private.
payload: ValueFree-form payload — varies per event type.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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 Forget for Event
impl Freeze for Event
impl Move for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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