pub struct WebhookRuntime<U: UpstreamClient + ?Sized + 'static, P: PostClient + ?Sized + 'static> { /* private fields */ }Expand description
Lifecycle owner for webhooks. CRUD goes through the underlying
WebhookRegistry; task lifecycle (spawn on create, abort on delete)
is mirrored in the parallel handles map.
Implementations§
Source§impl<U: UpstreamClient + ?Sized + 'static, P: PostClient + ?Sized + 'static> WebhookRuntime<U, P>
impl<U: UpstreamClient + ?Sized + 'static, P: PostClient + ?Sized + 'static> WebhookRuntime<U, P>
pub fn new( registry: Arc<dyn WebhookRegistry>, upstream: Arc<U>, poster: Arc<P>, ) -> Self
Sourcepub fn with_memory_registry(upstream: Arc<U>, poster: Arc<P>) -> Self
pub fn with_memory_registry(upstream: Arc<U>, poster: Arc<P>) -> Self
Convenience: default-backed in-memory registry.
pub async fn create(&self, input: WebhookInput) -> WebhookResult<Webhook>
pub async fn list(&self) -> WebhookResult<Vec<Webhook>>
pub async fn get(&self, id: &str) -> WebhookResult<Option<Webhook>>
pub async fn edit( &self, id: &str, input: WebhookInput, ) -> WebhookResult<Webhook>
pub async fn delete(&self, id: &str) -> WebhookResult<bool>
Auto Trait Implementations§
impl<U, P> Freeze for WebhookRuntime<U, P>
impl<U, P> !RefUnwindSafe for WebhookRuntime<U, P>
impl<U, P> Send for WebhookRuntime<U, P>
impl<U, P> Sync for WebhookRuntime<U, P>
impl<U, P> Unpin for WebhookRuntime<U, P>
impl<U, P> UnsafeUnpin for WebhookRuntime<U, P>
impl<U, P> !UnwindSafe for WebhookRuntime<U, P>
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