pub struct ConnectionWebhooks { /* private fields */ }Expand description
Handlers scoped to a single connection. Only the events that carry a connection are offered here, so a scoped handler can never be one that could not fire.
Implementations§
Source§impl ConnectionWebhooks
impl ConnectionWebhooks
Sourcepub fn connection_created<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<ConnectionCreatedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
pub fn connection_created<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<ConnectionCreatedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
Registers a handler for connection.created on this connection.
Sourcepub fn connection_deleted<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<ConnectionDeletedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
pub fn connection_deleted<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<ConnectionDeletedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
Registers a handler for connection.deleted on this connection.
Sourcepub fn connection_oauth_created<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<ConnectionOAuthCreatedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
pub fn connection_oauth_created<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<ConnectionOAuthCreatedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
Registers a handler for connection.oauth.created on this connection.
Sourcepub fn connection_updated<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<ConnectionUpdatedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
pub fn connection_updated<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<ConnectionUpdatedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
Registers a handler for connection.updated on this connection.
Sourcepub fn oauth_failed<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<OAuthFailedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
pub fn oauth_failed<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<OAuthFailedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
Registers a handler for oauth.failed on this connection.
Sourcepub fn oauth_refreshed<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<OAuthRefreshedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
pub fn oauth_refreshed<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<OAuthRefreshedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
Registers a handler for oauth.refreshed on this connection.
Sourcepub fn passthrough_executed<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<PassthroughExecutedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
pub fn passthrough_executed<F, Fut, Output>(self, handler: F) -> Selfwhere
F: Fn(Delivery<PassthroughExecutedPayload>) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Output> + Send + 'static,
Output: WebhookHandlerOutput + Send + 'static,
Registers a handler for passthrough.executed on this connection.
Auto Trait Implementations§
impl !RefUnwindSafe for ConnectionWebhooks
impl !UnwindSafe for ConnectionWebhooks
impl Forget for ConnectionWebhooks
impl Freeze for ConnectionWebhookswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(WebhookEventType, Vec<Registered>)>: Freeze,
PhantomData<Registered>: Freeze,
impl Move for ConnectionWebhooks
impl Send for ConnectionWebhooks
impl Sync for ConnectionWebhooks
impl Unpin for ConnectionWebhooks
impl UnsafeUnpin for ConnectionWebhookswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(WebhookEventType, Vec<Registered>)>: UnsafeUnpin,
PhantomData<Registered>: UnsafeUnpin,
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