Struct ra_ap_project_model::CargoWorkspace [−][src]
pub struct CargoWorkspace { /* fields omitted */ }Expand description
CargoWorkspace represents the logical structure of, well, a Cargo
workspace. It pretty closely mirrors cargo metadata output.
Note that internally, rust analyzer uses a different structure:
CrateGraph. CrateGraph is lower-level: it knows only about the crates,
while this knows about Packages & Targets: purely cargo-related
concepts.
We use absolute paths here, cargo metadata guarantees to always produce
abs paths.
Implementations
pub fn fetch_metadata(
cargo_toml: &ManifestPath,
config: &CargoConfig,
progress: &dyn Fn(String)
) -> Result<Metadata>
pub fn from_cargo_metadata3(
cargo_toml: &ManifestPath,
config: &CargoConfig,
progress: &dyn Fn(String)
) -> Result<CargoWorkspace>
Trait Implementations
type Output = PackageData
type Output = PackageData
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
type Output = TargetData
type Output = TargetData
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for CargoWorkspace
impl Send for CargoWorkspace
impl Sync for CargoWorkspace
impl Unpin for CargoWorkspace
impl UnwindSafe for CargoWorkspace
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.