pub enum DetectorHit {
Project {
kind: KindId,
signals: Vec<String>,
},
Workspace {
kind: WorkspaceKindId,
members: Vec<PathBuf>,
signals: Vec<String>,
},
Both {
project_kind: KindId,
workspace_kind: WorkspaceKindId,
members: Vec<PathBuf>,
signals: Vec<String>,
},
}Expand description
Result of probing a directory with a single Detector.
DetectorHit::Project— the dir is a project of some kind.DetectorHit::Workspace— the dir is a workspace manifest declaring a set of member project roots.DetectorHit::Both— the same manifest declares both (e.g. aCargo.tomlwith[package]AND[workspace]).
Variants§
Project
A standalone project — no workspace manifest detected by this detector at this dir.
Fields
Workspace
A workspace manifest at this dir, declaring member project roots.
Fields
§
kind: WorkspaceKindIdWhat kind of workspace organizer (Cargo, Npm, …).
Both
Combined: the same on-disk artifact declares both project and
workspace responsibilities. Typical for a Cargo workspace whose
root is also a crate, or a Node monorepo whose root has a
package.json with both name and workspaces.
Implementations§
Source§impl DetectorHit
impl DetectorHit
Sourcepub fn project_kind(&self) -> Option<&KindId>
pub fn project_kind(&self) -> Option<&KindId>
Borrow the project-facet kind, if this hit carries one.
Sourcepub fn workspace_kind(&self) -> Option<&WorkspaceKindId>
pub fn workspace_kind(&self) -> Option<&WorkspaceKindId>
Borrow the workspace-facet kind, if this hit carries one.
Trait Implementations§
Source§impl Clone for DetectorHit
impl Clone for DetectorHit
Source§fn clone(&self) -> DetectorHit
fn clone(&self) -> DetectorHit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DetectorHit
impl Debug for DetectorHit
Auto Trait Implementations§
impl Freeze for DetectorHit
impl RefUnwindSafe for DetectorHit
impl Send for DetectorHit
impl Sync for DetectorHit
impl Unpin for DetectorHit
impl UnsafeUnpin for DetectorHit
impl UnwindSafe for DetectorHit
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