pub struct Filesystem { /* private fields */ }Expand description
Represents the filesystem structure for git-ai. Handles paths for hooks and binaries.
Implementations§
Source§impl Filesystem
impl Filesystem
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Creates a new Filesystem instance. Initializes paths for git hooks and binaries.
§Returns
Result<Self>- The initialized filesystem or an error
Sourcepub fn git_ai_hook_bin_path(&self) -> Result<File>
pub fn git_ai_hook_bin_path(&self) -> Result<File>
Sourcepub fn git_hooks_path(&self) -> Dir
pub fn git_hooks_path(&self) -> Dir
Sourcepub fn prepare_commit_msg_path(&self) -> Result<File>
pub fn prepare_commit_msg_path(&self) -> Result<File>
Trait Implementations§
Source§impl Clone for Filesystem
impl Clone for Filesystem
Source§fn clone(&self) -> Filesystem
fn clone(&self) -> Filesystem
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for Filesystem
impl RefUnwindSafe for Filesystem
impl Send for Filesystem
impl Sync for Filesystem
impl Unpin for Filesystem
impl UnwindSafe for Filesystem
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more