Struct cargo_test_support::git::RepoBuilder
source · pub struct RepoBuilder { /* private fields */ }
Implementations§
source§impl RepoBuilder
impl RepoBuilder
pub fn init(p: &Path) -> RepoBuilder
sourcepub fn file(self, path: &str, contents: &str) -> RepoBuilder
pub fn file(self, path: &str, contents: &str) -> RepoBuilder
Add a file to the repository.
sourcepub fn nocommit_symlink_dir<T: AsRef<Path>>(self, dst: T, src: T) -> Self
pub fn nocommit_symlink_dir<T: AsRef<Path>>(self, dst: T, src: T) -> Self
Create a symlink to a directory
sourcepub fn nocommit_file(self, path: &str, contents: &str) -> RepoBuilder
pub fn nocommit_file(self, path: &str, contents: &str) -> RepoBuilder
Add a file that will be left in the working directory, but not added to the repository.
sourcepub fn build(self) -> Repository
pub fn build(self) -> Repository
Create the repository and commit the new files.
Auto Trait Implementations§
impl Freeze for RepoBuilder
impl RefUnwindSafe for RepoBuilder
impl Send for RepoBuilder
impl !Sync for RepoBuilder
impl Unpin 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
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