Struct ra_ap_project_model::CargoWorkspace
source · [−]pub struct CargoWorkspace { /* private fields */ }
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,
current_dir: &AbsPath,
config: &CargoConfig,
progress: &dyn Fn(String)
) -> Result<Metadata>
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.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more