pub struct RepoBuilder { /* private fields */ }Expand description
Builder for creating test repositories with specific states.
Implementations§
Source§impl RepoBuilder
impl RepoBuilder
Sourcepub fn with_file(self, path: &str, content: &str) -> AppResult<Self>
pub fn with_file(self, path: &str, content: &str) -> AppResult<Self>
Creates or overwrites a file in the working tree.
Sourcepub fn with_commit(self, message: &str) -> AppResult<Self>
pub fn with_commit(self, message: &str) -> AppResult<Self>
Stages all changes and creates a commit.
Sourcepub fn with_branch(self, name: &str) -> AppResult<Self>
pub fn with_branch(self, name: &str) -> AppResult<Self>
Creates a new branch at HEAD.
Sourcepub fn with_checkout(self, branch: &str) -> AppResult<Self>
pub fn with_checkout(self, branch: &str) -> AppResult<Self>
Switches to the named branch.
Auto Trait Implementations§
impl !Sync for RepoBuilder
impl Freeze for RepoBuilder
impl RefUnwindSafe for RepoBuilder
impl Send for RepoBuilder
impl Unpin for RepoBuilder
impl UnsafeUnpin for RepoBuilder
impl UnwindSafe for RepoBuilder
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