pub enum WebhookEvent {
ChannelOccupied {
channel: String,
},
ChannelVacated {
channel: String,
},
MemberAdded {
channel: String,
user_id: String,
},
MemberRemoved {
channel: String,
user_id: String,
},
ClientEvent {
channel: String,
event: String,
data: String,
socket_id: String,
user_id: Option<String>,
},
CacheMiss {
channel: String,
event: String,
},
Unknown(HashMap<String, String>),
}Expand description
Strongly typed webhook event
Variants§
ChannelOccupied
ChannelVacated
MemberAdded
MemberRemoved
ClientEvent
CacheMiss
Unknown(HashMap<String, String>)
Implementations§
Source§impl WebhookEvent
impl WebhookEvent
Sourcepub fn event_name(&self) -> &str
pub fn event_name(&self) -> &str
Gets the event name
Sourcepub fn to_hashmap(&self) -> HashMap<String, String>
pub fn to_hashmap(&self) -> HashMap<String, String>
Converts the event back to a HashMap
Trait Implementations§
Source§impl Clone for WebhookEvent
impl Clone for WebhookEvent
Source§fn clone(&self) -> WebhookEvent
fn clone(&self) -> WebhookEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WebhookEvent
impl Debug for WebhookEvent
Source§impl PartialEq for WebhookEvent
impl PartialEq for WebhookEvent
impl StructuralPartialEq for WebhookEvent
Auto Trait Implementations§
impl Freeze for WebhookEvent
impl RefUnwindSafe for WebhookEvent
impl Send for WebhookEvent
impl Sync for WebhookEvent
impl Unpin for WebhookEvent
impl UnsafeUnpin for WebhookEvent
impl UnwindSafe for WebhookEvent
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