pub enum HookSource {
Settings,
Project,
Plugin {
name: String,
},
Programmatic,
Session,
}Expand description
Hook 来源 — 用于冲突解决、日志追踪和安全策略。
§Examples
use katu_core::hook::HookSource;
let src = HookSource::Plugin { name: "linter".into() };
assert!(matches!(src, HookSource::Plugin { .. }));Variants§
Settings
用户全局配置文件。
Project
项目配置文件。
Plugin
Plugin 注册。
Programmatic
SDK / 程序化注册。
Session
Session 级别临时注册。
Trait Implementations§
Source§impl Clone for HookSource
impl Clone for HookSource
Source§fn clone(&self) -> HookSource
fn clone(&self) -> HookSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HookSource
impl Debug for HookSource
Source§impl<'de> Deserialize<'de> for HookSource
impl<'de> Deserialize<'de> for HookSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HookSource
impl PartialEq for HookSource
Source§fn eq(&self, other: &HookSource) -> bool
fn eq(&self, other: &HookSource) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for HookSource
impl Serialize for HookSource
impl Eq for HookSource
impl StructuralPartialEq for HookSource
Auto Trait Implementations§
impl Freeze for HookSource
impl RefUnwindSafe for HookSource
impl Send for HookSource
impl Sync for HookSource
impl Unpin for HookSource
impl UnsafeUnpin for HookSource
impl UnwindSafe for HookSource
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