pub struct WorkspaceScope { /* private fields */ }Expand description
A discovery’s workspace filter: the exact recorded folder (the default), or
the folder and every folder under it (workspace_subtree).
Implementations§
Source§impl WorkspaceScope
impl WorkspaceScope
Sourcepub fn exact(wanted: &Path) -> Self
pub fn exact(wanted: &Path) -> Self
The exact-folder filter every caller had before workspace_subtree.
Sourcepub fn subtree(root: &Path) -> Self
pub fn subtree(root: &Path) -> Self
The folder and every folder under it, and every folder linked into it
by a symlink directly in it. A project moved to another disk and linked
back (~/work/app -> /Volumes/Disk/app) is still where its owner works,
but its harness records the link’s target as the session’s cwd, which a
prefix of the root alone never admits. A link that leads to the root or
above it is ignored: it would widen the scope to the whole disk.
Sourcepub fn of(query: &DiscoveryQuery) -> Option<Self>
pub fn of(query: &DiscoveryQuery) -> Option<Self>
The scope a query asks for, if it filters by workspace at all.
Auto Trait Implementations§
impl !Freeze for WorkspaceScope
impl RefUnwindSafe for WorkspaceScope
impl Send for WorkspaceScope
impl Sync for WorkspaceScope
impl Unpin for WorkspaceScope
impl UnsafeUnpin for WorkspaceScope
impl UnwindSafe for WorkspaceScope
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