Enum ra_ap_project_model::ProjectWorkspace[][src]

pub enum ProjectWorkspace {
    Cargo {
        cargo: CargoWorkspace,
        build_scripts: WorkspaceBuildScripts,
        sysroot: Option<Sysroot>,
        rustc: Option<CargoWorkspace>,
        rustc_cfg: Vec<CfgFlag>,
        cfg_overrides: CfgOverrides,
    },
    Json {
        project: ProjectJson,
        sysroot: Option<Sysroot>,
        rustc_cfg: Vec<CfgFlag>,
    },
    DetachedFiles {
        files: Vec<AbsPathBuf>,
        sysroot: Sysroot,
        rustc_cfg: Vec<CfgFlag>,
    },
}

Variants

Cargo

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

Fields of Cargo

cargo: CargoWorkspacebuild_scripts: WorkspaceBuildScriptssysroot: Option<Sysroot>rustc: Option<CargoWorkspace>rustc_cfg: Vec<CfgFlag>

Holds cfg flags for the current target. We get those by running rustc --print cfg.

FIXME: make this a per-crate map, as, eg, build.rs might have a different target.

cfg_overrides: CfgOverrides
Json

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

Fields of Json

project: ProjectJsonsysroot: Option<Sysroot>rustc_cfg: Vec<CfgFlag>
DetachedFiles

Project with a set of disjoint files, not belonging to any particular workspace. Backed by basic sysroot crates for basic completion and highlighting.

Fields of DetachedFiles

files: Vec<AbsPathBuf>sysroot: Sysrootrustc_cfg: Vec<CfgFlag>

Implementations

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. 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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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