pub struct Workspace { /* private fields */ }Expand description
A set of directories a front end may look inside.
Implementations§
Source§impl Workspace
impl Workspace
Sourcepub fn new<I, P>(roots: I) -> Result<Self>
pub fn new<I, P>(roots: I) -> Result<Self>
Build from candidate roots, dropping any that do not resolve.
A root that does not exist is dropped rather than fatal, but an empty result is fatal: a workspace with no roots would either confine nothing or confine everything depending on how the check is written, and neither is a state to start a daemon in.
pub fn roots(&self) -> &[PathBuf]
Sourcepub fn root_labels(&self) -> Vec<String>
pub fn root_labels(&self) -> Vec<String>
Human-readable roots, for a /policy response or an MCP tool description.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnsafeUnpin for Workspace
impl UnwindSafe for Workspace
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