Struct cargo_test_support::ProjectBuilder
source · pub struct ProjectBuilder { /* private fields */ }
Expand description
Create a project to run tests against
The project can be constructed programmatically or from the filesystem with Project::from_template
Implementations§
source§impl ProjectBuilder
impl ProjectBuilder
sourcepub fn target_debug_dir(&self) -> PathBuf
pub fn target_debug_dir(&self) -> PathBuf
Project’s debug dir, ex: /path/to/cargo/target/cit/t0/foo/target/debug
pub fn new(root: PathBuf) -> ProjectBuilder
pub fn at<P: AsRef<Path>>(self, path: P) -> Self
sourcepub fn executable<B: AsRef<Path>>(self, path: B, body: &str) -> Self
pub fn executable<B: AsRef<Path>>(self, path: B, body: &str) -> Self
Adds an executable file to the project.
sourcepub fn symlink<T: AsRef<Path>>(self, dst: T, src: T) -> Self
pub fn symlink<T: AsRef<Path>>(self, dst: T, src: T) -> Self
Adds a symlink to a file to the project.
sourcepub fn symlink_dir<T: AsRef<Path>>(self, dst: T, src: T) -> Self
pub fn symlink_dir<T: AsRef<Path>>(self, dst: T, src: T) -> Self
Create a symlink to a directory
pub fn no_manifest(self) -> Self
Auto Trait Implementations§
impl Freeze for ProjectBuilder
impl RefUnwindSafe for ProjectBuilder
impl Send for ProjectBuilder
impl Sync for ProjectBuilder
impl Unpin for ProjectBuilder
impl UnwindSafe for ProjectBuilder
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