pub struct FunctionHook {
pub id: Option<String>,
pub timeout: Option<u64>,
pub callback: Arc<dyn Fn(&[Value]) -> bool + Send + Sync>,
pub error_message: String,
pub status_message: Option<String>,
}Expand description
Function hook type with callback embedded. Session-scoped only, cannot be persisted to settings.json.
Fields§
§id: Option<String>§timeout: Option<u64>§callback: Arc<dyn Fn(&[Value]) -> bool + Send + Sync>§error_message: String§status_message: Option<String>Implementations§
Trait Implementations§
Source§impl Clone for FunctionHook
impl Clone for FunctionHook
Source§fn clone(&self) -> FunctionHook
fn clone(&self) -> FunctionHook
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FunctionHook
impl !RefUnwindSafe for FunctionHook
impl Send for FunctionHook
impl Sync for FunctionHook
impl Unpin for FunctionHook
impl UnsafeUnpin for FunctionHook
impl !UnwindSafe for FunctionHook
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