pub struct HooksConfig {
pub workspace_file: PathBuf,
pub global_dir: Option<PathBuf>,
pub supplied: Vec<HookSpec>,
}Expand description
Where to look for hooks.
Fields§
§workspace_file: PathBufPath relative to the workspace root. Empty names no file to look for;
HooksConfig::supplied_only writes it.
global_dir: Option<PathBuf>The global config directory, if any. hooks.json inside it is used.
supplied: Vec<HookSpec>Hooks the host supplies as typed values. They run before hooks loaded from disk, while runtime interceptors still run before every subprocess hook.
Implementations§
Source§impl HooksConfig
impl HooksConfig
Sourcepub fn with_supplied(self, supplied: Vec<HookSpec>) -> Self
pub fn with_supplied(self, supplied: Vec<HookSpec>) -> Self
Replaces the hooks supplied directly by the embedding host.
Sourcepub fn supplied_only(self) -> Self
pub fn supplied_only(self) -> Self
The host’s own hooks, and no file discovery at all: neither
.basis/hooks.json nor the global one is read.
What WorkspaceBuilder::without_discovery leaves of this config.
Supplied hooks survive, because a host handing basis a typed hook has
stated it rather than left it on disk to be found.
Trait Implementations§
Source§impl Clone for HooksConfig
impl Clone for HooksConfig
Source§impl Debug for HooksConfig
impl Debug for HooksConfig
Source§impl Default for HooksConfig
impl Default for HooksConfig
impl Eq for HooksConfig
Source§impl PartialEq for HooksConfig
impl PartialEq for HooksConfig
impl StructuralPartialEq for HooksConfig
Auto Trait Implementations§
impl Forget for HooksConfig
impl Freeze for HooksConfig
impl RefUnwindSafe for HooksConfig
impl Send for HooksConfig
impl Sync for HooksConfig
impl Unpin for HooksConfig
impl UnsafeUnpin for HooksConfig
impl UnwindSafe for HooksConfig
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