pub enum HookFunction {
PreInstall,
PostInstall,
PreRun,
}Expand description
Enumeration of all available hook functions that can be implemented by plugins.
Hook functions are called at specific points during proto operations to allow plugins to customize behavior, perform setup/cleanup, or modify the environment.
Variants§
PreInstall
Pre-install hook.
Called before a tool installation begins, allowing plugins to perform setup tasks, validate prerequisites, or modify the installation environment.
Input: InstallHook | Output: None
PostInstall
Post-install hook.
Called after a tool installation completes successfully, allowing plugins to perform cleanup tasks, configure the tool, or set up additional resources.
Input: InstallHook | Output: None
PreRun
Pre-run hook.
Called before executing a tool’s executable, allowing plugins to modify environment variables, validate runtime conditions, or perform setup.
Input: RunHook | Output: RunHookResult
Implementations§
Trait Implementations§
Source§impl AsRef<str> for HookFunction
impl AsRef<str> for HookFunction
Source§impl Clone for HookFunction
impl Clone for HookFunction
Source§fn clone(&self) -> HookFunction
fn clone(&self) -> HookFunction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HookFunction
impl Debug for HookFunction
Source§impl Hash for HookFunction
impl Hash for HookFunction
Source§impl PartialEq for HookFunction
impl PartialEq for HookFunction
impl Copy for HookFunction
impl Eq for HookFunction
impl StructuralPartialEq for HookFunction
Auto Trait Implementations§
impl Freeze for HookFunction
impl RefUnwindSafe for HookFunction
impl Send for HookFunction
impl Sync for HookFunction
impl Unpin for HookFunction
impl UnwindSafe for HookFunction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.