pub struct HookCallback {
pub callback_type: String,
pub callback: Box<dyn Fn(HookInput, Option<String>, Option<Receiver<()>>, Option<usize>, Option<HookCallbackContext>) -> Pin<Box<dyn Future<Output = HookJSONOutput> + Send>> + Send + Sync>,
pub timeout: Option<u64>,
pub internal: Option<bool>,
}Expand description
Hook that is a callback.
Fields§
§callback_type: String§callback: Box<dyn Fn(HookInput, Option<String>, Option<Receiver<()>>, Option<usize>, Option<HookCallbackContext>) -> Pin<Box<dyn Future<Output = HookJSONOutput> + Send>> + Send + Sync>§timeout: Option<u64>Timeout in seconds for this hook
internal: Option<bool>Internal hooks excluded from tengu_run_hook metrics
Auto Trait Implementations§
impl Freeze for HookCallback
impl !RefUnwindSafe for HookCallback
impl Send for HookCallback
impl Sync for HookCallback
impl Unpin for HookCallback
impl UnsafeUnpin for HookCallback
impl !UnwindSafe for HookCallback
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