pub struct HookGenerator { /* private fields */ }Expand description
Hook generator for creating shell integration scripts
Implementations§
Source§impl HookGenerator
impl HookGenerator
Sourcepub fn new(config: HookConfig) -> Self
pub fn new(config: HookConfig) -> Self
Create a new hook generator with the given configuration
Sourcepub fn for_shell(shell_type: ShellType) -> Self
pub fn for_shell(shell_type: ShellType) -> Self
Create a hook generator with default configuration for the specified shell
Sourcepub async fn generate_to_file(&self, output_path: &Path) -> Result<()>
pub async fn generate_to_file(&self, output_path: &Path) -> Result<()>
Generate and write a hook script to a file
Sourcepub fn get_install_path(&self) -> Result<String>
pub fn get_install_path(&self) -> Result<String>
Get the recommended installation path for the hook
Sourcepub fn get_install_instructions(&self) -> Result<String>
pub fn get_install_instructions(&self) -> Result<String>
Get installation instructions for the hook
Trait Implementations§
Source§impl Clone for HookGenerator
impl Clone for HookGenerator
Source§fn clone(&self) -> HookGenerator
fn clone(&self) -> HookGenerator
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 moreSource§impl Debug for HookGenerator
impl Debug for HookGenerator
Auto Trait Implementations§
impl Freeze for HookGenerator
impl RefUnwindSafe for HookGenerator
impl Send for HookGenerator
impl Sync for HookGenerator
impl Unpin for HookGenerator
impl UnwindSafe for HookGenerator
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