pub enum WebhookEventType {
Show 21 variants
ApiKeyCreated,
ApiKeyRevoked,
ConnectionCreated,
ConnectionDeleted,
ConnectionOAuthCreated,
ConnectionUpdated,
GrantCreated,
GrantRevoked,
GrantUpdated,
MemberAdded,
MemberRemoved,
MemberRoleUpdated,
OAuthFailed,
OAuthRefreshed,
OrganizationCreated,
OrganizationDeleted,
OrganizationUpdated,
PassthroughExecuted,
ProjectCreated,
ProjectDeleted,
ProjectUpdated,
}Expand description
Every event a One webhook subscription can deliver.
Generated from the SDK spec; the wire strings are the server contract.
Variants§
ApiKeyCreated
ApiKeyRevoked
ConnectionCreated
ConnectionDeleted
ConnectionOAuthCreated
ConnectionUpdated
GrantCreated
GrantRevoked
GrantUpdated
MemberAdded
MemberRemoved
MemberRoleUpdated
OAuthFailed
OAuthRefreshed
OrganizationCreated
OrganizationDeleted
OrganizationUpdated
PassthroughExecuted
ProjectCreated
ProjectDeleted
ProjectUpdated
Implementations§
Source§impl WebhookEventType
impl WebhookEventType
Sourcepub const ALL: &'static [Self]
pub const ALL: &'static [Self]
Every event in this build’s catalog, which is what a catch-all handler subscribes to. Regenerate the SDK to pick up events the server adds later.
Sourcepub const CONNECTION_SCOPED: &'static [Self]
pub const CONNECTION_SCOPED: &'static [Self]
The events that carry a connection, and so can be scoped to one. A connection-scoped catch-all subscribes to just these: the server cannot filter by connection, so subscribing to the rest would only ship deliveries the client discards.
Sourcepub fn parse(event: &str) -> Option<Self>
pub fn parse(event: &str) -> Option<Self>
Parses the on-the-wire event string, or None for an event this
SDK build does not recognize. Such a delivery still verifies and
reaches Webhooks::on_any; it simply has no typed handler.
Sourcepub fn connection_key_of(
&self,
payload: &JsonValue,
) -> Result<Option<String>, JsonError>
pub fn connection_key_of( &self, payload: &JsonValue, ) -> Result<Option<String>, JsonError>
Validates payload through this event’s own payload type and
returns its connection key when it carries one. A renamed or
reshaped field becomes a decode failure instead of a typed
handler receiving arbitrary JSON.
Trait Implementations§
Source§impl Clone for WebhookEventType
impl Clone for WebhookEventType
impl Copy for WebhookEventType
Source§impl Debug for WebhookEventType
impl Debug for WebhookEventType
Source§impl<'de> Deserialize<'de> for WebhookEventType
impl<'de> Deserialize<'de> for WebhookEventType
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>,
impl Eq for WebhookEventType
Source§impl Hash for WebhookEventType
impl Hash for WebhookEventType
Source§impl Ord for WebhookEventType
impl Ord for WebhookEventType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for WebhookEventType
impl PartialEq for WebhookEventType
Source§impl PartialOrd for WebhookEventType
impl PartialOrd for WebhookEventType
Source§impl Serialize for WebhookEventType
impl Serialize for WebhookEventType
impl StructuralPartialEq for WebhookEventType
Auto Trait Implementations§
impl Forget for WebhookEventType
impl Freeze for WebhookEventType
impl Move for WebhookEventType
impl RefUnwindSafe for WebhookEventType
impl Send for WebhookEventType
impl Sync for WebhookEventType
impl Unpin for WebhookEventType
impl UnsafeUnpin for WebhookEventType
impl UnwindSafe for WebhookEventType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.