pub struct App { /* private fields */ }
Expand description
Gitnu’s running state.
Implementations§
source§impl App
impl App
sourcepub fn set_git_command(&mut self, git_command: GitCommand)
pub fn set_git_command(&mut self, git_command: GitCommand)
Sets the git_command of the App.
It is the responsibility of the programmer to ensure that this function is only called once per invokation of gitnu.
sourcepub fn arg<S: AsRef<OsStr>>(&mut self, arg: S)
pub fn arg<S: AsRef<OsStr>>(&mut self, arg: S)
Appends an argument to the final command to be ran.
sourcepub fn git_command(&self) -> Option<&GitCommand>
pub fn git_command(&self) -> Option<&GitCommand>
Get a reference to the current git command detected.
sourcepub fn run(&mut self) -> Result<(), GitnuError>
pub fn run(&mut self) -> Result<(), GitnuError>
Runs Gitnu after all parsing is complete.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl !UnwindSafe for App
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