pub struct HookEntry {
pub name: Option<String>,
pub event: HookEvent,
pub source: &'static str,
pub hook_type: &'static str,
pub label: String,
pub timeout: Option<u64>,
pub on_error: Option<OnError>,
pub session_index: Option<usize>,
pub filter: Option<HookFilter>,
pub metrics: Option<HookMetrics>,
pub unique_id: String,
}Expand description
列出 hook 时的摘要信息
Fields§
§name: Option<String>Hook 目录名(目录布局下有值)
event: HookEvent§source: &'static str§hook_type: &'static strHook 类型标签(bash / llm / builtin)
label: StringShell hook 的命令,LLM hook 的 prompt 摘要,或 Builtin hook 的名称
timeout: Option<u64>Hook 的超时秒数
on_error: Option<OnError>Hook 的失败策略
session_index: Option<usize>Session hook 在该 event 下的局部索引(仅 session 来源有值,用于 remove 操作)
filter: Option<HookFilter>条件过滤
metrics: Option<HookMetrics>执行指标
unique_id: StringHook 唯一标识,格式:builtin:<name> / user:<dir_name> / project:<dir_name> / session:<event_idx>
Auto Trait Implementations§
impl Freeze for HookEntry
impl RefUnwindSafe for HookEntry
impl Send for HookEntry
impl Sync for HookEntry
impl Unpin for HookEntry
impl UnsafeUnpin for HookEntry
impl UnwindSafe for HookEntry
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.