pub struct Project { /* private fields */ }
Expand description
Information about a Cargo project
Implementations§
Source§impl Project
impl Project
Sourcepub fn query<P>(path: P) -> Result<Self, Error>
pub fn query<P>(path: P) -> Result<Self, Error>
Retrieves information about the Cargo project at the given path
path
doesn’t need to be the directory that contains the Cargo.toml
file; it can be any
point within the Cargo project.
Sourcepub fn path(
&self,
artifact: Artifact<'_>,
profile: Profile,
target: Option<&str>,
host: &str,
) -> Result<PathBuf, Error>
pub fn path( &self, artifact: Artifact<'_>, profile: Profile, target: Option<&str>, host: &str, ) -> Result<PathBuf, Error>
Returns the path to a build artifact
§Inputs
artifact
is the kind of build artifact:Bin
(--bin
),Example
(--example
),Lib
(--lib
)profile
is the compilation profile:Dev
orRelease
(--release
)target
is the specified compilation target (--target
)host
is the triple of host – this is used as the compilation target when notarget
is specified and the project has no default build target
Sourcepub fn target_dir(&self) -> &Path
pub fn target_dir(&self) -> &Path
Returns the target directory path
This is where build artifacts are placed
Auto Trait Implementations§
impl Freeze for Project
impl RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnwindSafe for Project
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