[][src]Enum ra_ap_project_model::ProjectWorkspace

pub enum ProjectWorkspace {
    Cargo {
        cargo: CargoWorkspace,
        sysroot: Sysroot,
        rustc: Option<CargoWorkspace>,
    },
    Json {
        project: ProjectJson,
        sysroot: Option<Sysroot>,
    },
}

Variants

Cargo

Project workspace was discovered by running cargo metadata and rustc --print sysroot.

Fields of Cargo

cargo: CargoWorkspacesysroot: Sysrootrustc: Option<CargoWorkspace>
Json

Project workspace was manually specified using a rust-project.json file.

Fields of Json

project: ProjectJsonsysroot: Option<Sysroot>

Implementations

impl ProjectWorkspace[src]

pub fn load(
    manifest: ProjectManifest,
    config: &CargoConfig
) -> Result<ProjectWorkspace>
[src]

pub fn load_inline(project_json: ProjectJson) -> Result<ProjectWorkspace>[src]

pub fn to_roots(&self) -> Vec<PackageRoot>[src]

Returns the roots for the current ProjectWorkspace The return type contains the path and whether or not the root is a member of the current workspace

pub fn n_packages(&self) -> usize[src]

pub fn to_crate_graph(
    &self,
    target: Option<&str>,
    proc_macro_client: &ProcMacroClient,
    load: &mut dyn FnMut(&AbsPath) -> Option<FileId>
) -> CrateGraph
[src]

Trait Implementations

impl Clone for ProjectWorkspace[src]

impl Debug for ProjectWorkspace[src]

impl Eq for ProjectWorkspace[src]

impl PartialEq<ProjectWorkspace> for ProjectWorkspace[src]

impl StructuralEq for ProjectWorkspace[src]

impl StructuralPartialEq for ProjectWorkspace[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.