pub enum EntityType {
Repository,
PullRequest,
Issue,
Branch,
Release,
User,
Organization,
CheckRun,
CheckSuite,
Deployment,
Unknown,
}Expand description
Classifies the primary entity involved in the event for session correlation.
Entity types are used to group related events for ordered processing and to determine session ID generation strategies.
Variants§
Repository
Repository-level event
PullRequest
Pull request event
Issue
Issue event
Branch
Branch event (push, create, delete)
Release
Release event
User
User event
Organization
Organization event
CheckRun
Check run event
CheckSuite
Check suite event
Deployment
Deployment event
Unknown
Unknown or unsupported entity type
Implementations§
Source§impl EntityType
impl EntityType
Sourcepub fn from_event_type(event_type: &str) -> Self
pub fn from_event_type(event_type: &str) -> Self
Determine entity type from GitHub event type string.
§Examples
use github_bot_sdk::events::EntityType;
assert_eq!(EntityType::from_event_type("pull_request"), EntityType::PullRequest);
assert_eq!(EntityType::from_event_type("issues"), EntityType::Issue);
assert_eq!(EntityType::from_event_type("push"), EntityType::Branch);
assert_eq!(EntityType::from_event_type("unknown"), EntityType::Unknown);Sourcepub fn supports_ordering(&self) -> bool
pub fn supports_ordering(&self) -> bool
Check if this entity type supports ordered processing.
Returns true for entity types where event ordering matters (pull requests, issues, branches).
Trait Implementations§
Source§impl Clone for EntityType
impl Clone for EntityType
Source§fn clone(&self) -> EntityType
fn clone(&self) -> EntityType
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 EntityType
impl Debug for EntityType
Source§impl<'de> Deserialize<'de> for EntityType
impl<'de> Deserialize<'de> for EntityType
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
Source§impl PartialEq for EntityType
impl PartialEq for EntityType
Source§impl Serialize for EntityType
impl Serialize for EntityType
impl Eq for EntityType
impl StructuralPartialEq for EntityType
Auto Trait Implementations§
impl Freeze for EntityType
impl RefUnwindSafe for EntityType
impl Send for EntityType
impl Sync for EntityType
impl Unpin for EntityType
impl UnsafeUnpin for EntityType
impl UnwindSafe for EntityType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.