pub enum ProjectWorkspaceKind {
Cargo {
cargo: CargoWorkspace,
error: Option<Arc<Error>>,
build_scripts: WorkspaceBuildScripts,
rustc: Result<Box<(CargoWorkspace, WorkspaceBuildScripts)>, Option<String>>,
cargo_config_extra_env: FxHashMap<String, String>,
set_test: bool,
},
Json(ProjectJson),
DetachedFile {
file: ManifestPath,
cargo: Option<(CargoWorkspace, WorkspaceBuildScripts, Option<Arc<Error>>)>,
cargo_config_extra_env: FxHashMap<String, String>,
set_test: bool,
},
}Variants§
Cargo
Project workspace was discovered by running cargo metadata and rustc --print sysroot.
Fields
§
cargo: CargoWorkspaceThe workspace as returned by cargo metadata.
§
error: Option<Arc<Error>>Additional cargo metadata error. (only populated if retried fetching via --no-deps succeeded).
§
build_scripts: WorkspaceBuildScriptsThe build script results for the workspace.
§
rustc: Result<Box<(CargoWorkspace, WorkspaceBuildScripts)>, Option<String>>The rustc workspace loaded for this workspace. An Err(None) means loading has been
disabled or was otherwise not requested.
Json(ProjectJson)
Project workspace was specified using a rust-project.json file.
DetachedFile
Project with a set of disjoint files, not belonging to any particular workspace. Backed by basic sysroot crates for basic completion and highlighting.
Fields
§
file: ManifestPathThe file in question.
§
cargo: Option<(CargoWorkspace, WorkspaceBuildScripts, Option<Arc<Error>>)>Is this file a cargo script file?
Trait Implementations§
Source§impl Clone for ProjectWorkspaceKind
impl Clone for ProjectWorkspaceKind
Source§fn clone(&self) -> ProjectWorkspaceKind
fn clone(&self) -> ProjectWorkspaceKind
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProjectWorkspaceKind
impl RefUnwindSafe for ProjectWorkspaceKind
impl Send for ProjectWorkspaceKind
impl Sync for ProjectWorkspaceKind
impl Unpin for ProjectWorkspaceKind
impl UnwindSafe for ProjectWorkspaceKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more