[−][src]Struct cargo_project::Project
Information about a Cargo project
Methods
impl Project[src]
pub fn query<P>(path: P) -> Result<Self, Error> where
P: AsRef<Path>, [src]
P: AsRef<Path>,
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.
pub fn path(
&self,
artifact: Artifact,
profile: Profile,
target: Option<&str>,
host: &str
) -> Result<PathBuf, Error>[src]
&self,
artifact: Artifact,
profile: Profile,
target: Option<&str>,
host: &str
) -> Result<PathBuf, Error>
Returns the path to a build artifact
Inputs
artifactis the kind of build artifact:Bin(--bin),Example(--example),Lib(--lib)profileis the compilation profile:DevorRelease(--release)targetis the specified compilation target (--target)hostis the triple of host -- this is used as the compilation target when notargetis specified and the project has no default build target
pub fn name(&self) -> &str[src]
Returns the name of the project (package.name)
pub fn target(&self) -> Option<&str>[src]
Returns the default compilation target
pub fn toml(&self) -> &Path[src]
Returns the path to the project's Cargo.toml
pub fn target_dir(&self) -> &Path[src]
Returns the target directory path
This is where build artifacts are placed
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,