pub struct Hook {
pub event: HookEventName,
pub matcher: Option<String>,
pub timeout: Duration,
pub status_message: Option<String>,
pub if_condition: Option<String>,
pub once: bool,
pub kind: HookKind,
}Fields§
§event: HookEventName§matcher: Option<String>§timeout: Duration§status_message: Option<String>§if_condition: Option<String>§once: bool§kind: HookKindImplementations§
Source§impl Hook
impl Hook
pub fn callback<F, Fut, R>(event: HookEventName, callback: F) -> Self
pub fn function<Factory, F, Fut, R>( event: HookEventName, factory: Factory, ) -> Self
pub fn with_matcher(self, matcher: impl Into<String>) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_status_message(self, status_message: impl Into<String>) -> Self
pub fn with_if_condition(self, if_condition: impl Into<String>) -> Self
pub fn with_once(self, once: bool) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Hook
impl !RefUnwindSafe for Hook
impl Send for Hook
impl Sync for Hook
impl Unpin for Hook
impl UnsafeUnpin for Hook
impl !UnwindSafe for Hook
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