[−][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
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnwindSafe for Project
impl RefUnwindSafe for Project
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,